Пример #1
0
 private void ContextMenuAutostart(object sender, EventArgs e)
 {
     if (contextMenuAutostartItem.Checked)
     {
         Autostart.Disable();
     }
     else
     {
         Autostart.Enable();
     }
     contextMenuAutostartItem.Checked = Autostart.IsEnabled();
 }
Пример #2
0
 private void CreateContextMenu()
 {
     contextMenuAutostartItem = new MenuItem("&Autostart", ContextMenuAutostart)
     {
         Checked = Autostart.IsEnabled()
     };
     notifyIcon.ContextMenu = new ContextMenu(new[]
     {
         contextMenuAutostartItem,
         new MenuItem("-"),
         new MenuItem("&Settings", ContextMenuSettings),
         new MenuItem("E&xit", ContextMenuExit),
     });
 }