mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-17 10:53:27 +12:00
[Feature] Show message if target not exists (#257), version 1.1.1.5"
This commit is contained in:
parent
ab91572424
commit
7ebdb01934
|
@ -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.1.1.4")]
|
||||
[assembly: AssemblyFileVersion("1.1.1.4")]
|
||||
[assembly: AssemblyVersion("1.1.1.5")]
|
||||
[assembly: AssemblyFileVersion("1.1.1.5")]
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace SystemTrayMenu.Utilities
|
|||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
@ -104,10 +105,11 @@ namespace SystemTrayMenu.Utilities
|
|||
};
|
||||
p.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Win32Exception ex)
|
||||
{
|
||||
Warn($"fileName:'{fileName}' arguments:'{arguments}'", ex);
|
||||
if (ex.Message == "The system cannot find the file specified.")
|
||||
|
||||
if (ex.NativeErrorCode == 2 || ex.NativeErrorCode == 1223)
|
||||
{
|
||||
new Thread(ShowProblemWithShortcut).Start();
|
||||
static void ShowProblemWithShortcut()
|
||||
|
@ -120,6 +122,10 @@ namespace SystemTrayMenu.Utilities
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Warn($"fileName:'{fileName}' arguments:'{arguments}'", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue