mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-15 18:03:01 +12:00
[BUG] Fix wrong error message and unwanted drag (#405), version 1.2.9.25
This commit is contained in:
parent
c0e962dd19
commit
25ee3d2043
|
@ -939,6 +939,7 @@ namespace SystemTrayMenu.Business
|
|||
hitTestInfo.RowIndex > -1 &&
|
||||
hitTestInfo.RowIndex < dgv.Rows.Count)
|
||||
{
|
||||
lastMouseDownRowIndex = -1;
|
||||
RowData rowData = (RowData)dgv.Rows[hitTestInfo.RowIndex].Cells[2].Value;
|
||||
rowData.MouseClick(e, out bool toCloseByClick);
|
||||
waitToOpenMenu.ClickOpensInstantly(dgv, hitTestInfo.RowIndex);
|
||||
|
@ -959,8 +960,9 @@ namespace SystemTrayMenu.Business
|
|||
if (hitTestInfo.RowIndex > -1 &&
|
||||
dgv.Rows.Count > hitTestInfo.RowIndex)
|
||||
{
|
||||
RowData trigger = (RowData)dgv.Rows[hitTestInfo.RowIndex].Cells[2].Value;
|
||||
trigger.DoubleClick(e, out bool toCloseByDoubleClick);
|
||||
lastMouseDownRowIndex = -1;
|
||||
RowData rowData = (RowData)dgv.Rows[hitTestInfo.RowIndex].Cells[2].Value;
|
||||
rowData.DoubleClick(e, out bool toCloseByDoubleClick);
|
||||
InvalidateRowIfIndexInRange(dgv, hitTestInfo.RowIndex);
|
||||
if (toCloseByDoubleClick)
|
||||
{
|
||||
|
|
|
@ -242,7 +242,6 @@ namespace SystemTrayMenu.DataClasses
|
|||
internal void MouseClick(MouseEventArgs e, out bool toCloseByDoubleClick)
|
||||
{
|
||||
IsClicking = false;
|
||||
|
||||
toCloseByDoubleClick = false;
|
||||
if (Properties.Settings.Default.OpenItemWithOneClick)
|
||||
{
|
||||
|
@ -263,7 +262,6 @@ namespace SystemTrayMenu.DataClasses
|
|||
internal void DoubleClick(MouseEventArgs e, out bool toCloseByDoubleClick)
|
||||
{
|
||||
IsClicking = false;
|
||||
|
||||
toCloseByDoubleClick = false;
|
||||
if (!Properties.Settings.Default.OpenItemWithOneClick)
|
||||
{
|
||||
|
@ -288,7 +286,7 @@ namespace SystemTrayMenu.DataClasses
|
|||
{
|
||||
ProcessStarted = true;
|
||||
string workingDirectory = System.IO.Path.GetDirectoryName(ResolvedPath);
|
||||
Log.ProcessStart(Path, string.Empty, false, workingDirectory, true);
|
||||
Log.ProcessStart(Path, string.Empty, false, workingDirectory, true, ResolvedPath);
|
||||
if (!Properties.Settings.Default.StaysOpenWhenItemClicked)
|
||||
{
|
||||
toCloseByOpenItem = true;
|
||||
|
|
|
@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
|
|||
// 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("1.2.9.24")]
|
||||
[assembly: AssemblyFileVersion("1.2.9.24")]
|
||||
[assembly: AssemblyVersion("1.2.9.25")]
|
||||
[assembly: AssemblyFileVersion("1.2.9.25")]
|
||||
|
|
|
@ -149,7 +149,8 @@ namespace SystemTrayMenu.Utilities
|
|||
string arguments = "",
|
||||
bool doubleQuoteArg = false,
|
||||
string workingDirectory = "",
|
||||
bool createNoWindow = false)
|
||||
bool createNoWindow = false,
|
||||
string resolvedPath = "")
|
||||
{
|
||||
if (doubleQuoteArg && !string.IsNullOrEmpty(arguments))
|
||||
{
|
||||
|
@ -175,7 +176,8 @@ namespace SystemTrayMenu.Utilities
|
|||
{
|
||||
Warn($"fileName:'{fileName}' arguments:'{arguments}'", ex);
|
||||
|
||||
if (ex.NativeErrorCode == 2 || ex.NativeErrorCode == 1223)
|
||||
if ((ex.NativeErrorCode == 2 || ex.NativeErrorCode == 1223) &&
|
||||
(string.IsNullOrEmpty(resolvedPath) || !File.Exists(resolvedPath)))
|
||||
{
|
||||
new Thread(ShowProblemWithShortcut).Start();
|
||||
static void ShowProblemWithShortcut()
|
||||
|
|
Loading…
Reference in a new issue