From dd1e3728165752f34c3eaf195548ff21d93abdba Mon Sep 17 00:00:00 2001 From: tigros Date: Thu, 10 Aug 2023 09:09:58 -0400 Subject: [PATCH] minor --- whisperer/Form1.Designer.cs | 4 ++-- whisperer/Form1.cs | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/whisperer/Form1.Designer.cs b/whisperer/Form1.Designer.cs index a56064a..d99aef1 100644 --- a/whisperer/Form1.Designer.cs +++ b/whisperer/Form1.Designer.cs @@ -88,7 +88,7 @@ private void InitializeComponent() this.fastObjectListView1.Location = new System.Drawing.Point(12, 12); this.fastObjectListView1.Name = "fastObjectListView1"; this.fastObjectListView1.ShowGroups = false; - this.fastObjectListView1.Size = new System.Drawing.Size(1206, 353); + this.fastObjectListView1.Size = new System.Drawing.Size(1209, 353); this.fastObjectListView1.TabIndex = 30; this.fastObjectListView1.UseCompatibleStateImageBehavior = false; this.fastObjectListView1.UseHotItem = true; @@ -104,7 +104,7 @@ private void InitializeComponent() // this.olvColumn1.AspectName = "filename"; this.olvColumn1.Text = "File name"; - this.olvColumn1.Width = 875; + this.olvColumn1.Width = 1175; // // button2 // diff --git a/whisperer/Form1.cs b/whisperer/Form1.cs index 4874918..70f1ca5 100644 --- a/whisperer/Form1.cs +++ b/whisperer/Form1.cs @@ -213,11 +213,13 @@ private void button1_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { + fastObjectListView1.BeginUpdate(); foreach (string filename in openFileDialog1.FileNames) { if (!fexists(filename)) fastObjectListView1.AddObject(new filenameline(filename)); } + fastObjectListView1.EndUpdate(); setcount(); } } @@ -437,9 +439,9 @@ void tryrename(string filename, string ext) void renamewaves(string filename) { - if (filename.EndsWith(".wav.wav", StringComparison.InvariantCultureIgnoreCase)) + if (filename.EndsWith(".wav.wav")) { - filename = filename.Remove(filename.LastIndexOf(".wav.wav", StringComparison.InvariantCultureIgnoreCase)); + filename = filename.Remove(filename.Length - 8); foreach (string ext in exts) tryrename(filename, ext); } @@ -625,11 +627,13 @@ private void fastObjectListView1_DragEnter(object sender, DragEventArgs e) private void fastObjectListView1_DragDrop(object sender, DragEventArgs e) { + fastObjectListView1.BeginUpdate(); foreach (string file in (string[])e.Data.GetData(DataFormats.FileDrop)) { if (!fexists(file)) fastObjectListView1.AddObject(new filenameline(file)); } + fastObjectListView1.EndUpdate(); setcount(); }