Skip to content

Commit

Permalink
Double Click on file (#82), File contextmenu (#18), Double Click to s…
Browse files Browse the repository at this point in the history
…tart item not only one click (#66), version 0.10.1.2
  • Loading branch information
Hofknecht committed May 31, 2020
1 parent 2714df1 commit 0ff0aff
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 28 deletions.
1 change: 0 additions & 1 deletion Business/Menus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
50 changes: 25 additions & 25 deletions DataClasses/RowData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

0 comments on commit 0ff0aff

Please sign in to comment.