From 0ff0aff66b82e7348e7e2d30b44ac88b480aad8a Mon Sep 17 00:00:00 2001 From: Markus Hofknecht Date: Mon, 1 Jun 2020 00:08:10 +0200 Subject: [PATCH] Double Click on file (#82), File contextmenu (#18), Double Click to start item not only one click (#66), version 0.10.1.2 --- Business/Menus.cs | 1 - DataClasses/RowData.cs | 50 +++++++++++++++++++------------------- Properties/AssemblyInfo.cs | 4 +-- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/Business/Menus.cs b/Business/Menus.cs index d4a43d38..c4f98352 100644 --- a/Business/Menus.cs +++ b/Business/Menus.cs @@ -533,7 +533,6 @@ private void Dgv_CellMouseLeave(object sender, DataGridViewCellEventArgs e) } } -#warning [Feature] Double Click to start item not only one click #66 private void Dgv_MouseDown(object sender, MouseEventArgs e) { DataGridView dgv = (DataGridView)sender; diff --git a/DataClasses/RowData.cs b/DataClasses/RowData.cs index 0eaab300..7c1c03df 100644 --- a/DataClasses/RowData.cs +++ b/DataClasses/RowData.cs @@ -305,31 +305,6 @@ internal void MouseDown(DataGridView dgv, MouseEventArgs e) waitMenuOpen.Click(); } - if (e == null || - e.Button == MouseButtons.Left && - !ContainsMenu) - { - try - { - using (Process p = new Process()) - { - p.StartInfo = new ProcessStartInfo(TargetFilePath) - { - FileName = TargetFilePathOrig, - Arguments = Arguments, - WorkingDirectory = WorkingDirectory, - CreateNoWindow = true - }; - p.Start(); - }; - } - catch (Win32Exception ex) - { - Log.Warn($"path:'{TargetFilePath}'", ex); - MessageBox.Show(ex.Message); - } - } - if (e != null && e.Button == MouseButtons.Right && FileInfo != null && @@ -372,6 +347,31 @@ internal void MouseDown(DataGridView dgv, MouseEventArgs e) internal void DoubleClick(MouseEventArgs e) { + if (e == null || + e.Button == MouseButtons.Left && + !ContainsMenu) + { + try + { + using (Process p = new Process()) + { + p.StartInfo = new ProcessStartInfo(TargetFilePath) + { + FileName = TargetFilePathOrig, + Arguments = Arguments, + WorkingDirectory = WorkingDirectory, + CreateNoWindow = true + }; + p.Start(); + }; + } + catch (Win32Exception ex) + { + Log.Warn($"path:'{TargetFilePath}'", ex); + MessageBox.Show(ex.Message); + } + } + if (e == null || e.Button == MouseButtons.Left && ContainsMenu) diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 78d51fcf..650c27a1 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.10.1.1")] -[assembly: AssemblyFileVersion("0.10.1.1")] +[assembly: AssemblyVersion("0.10.1.2")] +[assembly: AssemblyFileVersion("0.10.1.2")]