public void App_StartupNextInstance(object sender, Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs e)
{
foreach (string commandLineArg in e.CommandLine)
{
if (commandLineArg.ToUpperInvariant() == "/EXIT")
{
// Close the application
this.MenuTrayExit_Click(sender, e);
return;
}
}
// Do the same as a double click on the tray icon
this.MenuTrayShow_Click(sender, e);
}