Example #1
0
 private void installStartupToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (installStartupToolStripMenuItem.Checked)
     {
         StartupUtils.InstallStartup(AppName, false);
         installStartupToolStripMenuItem.Checked = false;
     }
     else
     {
         StartupUtils.InstallStartup(AppName, true);
         installStartupToolStripMenuItem.Checked = true;
     }
 }
Example #2
0
        private void trayContextMenu_Opening(object sender, CancelEventArgs e)
        {
            installStartupToolStripMenuItem.Checked = StartupUtils.IsStartupInstalled(AppName);
            switch (Server_.State)
            {
            case ConvertWin32Core.ServerState.Stopped:
                startToolStripMenuItem.Enabled = true;
                stopToolStripMenuItem.Enabled  = false;
                break;

            default:
                startToolStripMenuItem.Enabled = false;
                stopToolStripMenuItem.Enabled  = true;
                break;
            }
        }