public void menuItemAutostart_click(object o, EventArgs e)
 {
     if (AutoStart.IsOn())
     {
         AutoStart.SetOff();
     }
     else
     {
         AutoStart.SetOn();
     }
     OnStartTextChange();
 }
 public void OnStartTextChange()
 {
     if (AutoStart.IsOn())
     {
         menuItemStartOnOff.Text    = Constants.AUTO_START_ON;
         MenuItemStartOnOff.Checked = true;
     }
     else
     {
         menuItemStartOnOff.Text    = Constants.AUTO_START_OFF;
         MenuItemStartOnOff.Checked = false;
     }
 }
示例#3
0
        static void Main()
        {
            //eyeXHost.Start();
            path = Application.StartupPath + "\\" + "Settings.json";
            ReadWriteJson();
            ReadWriteJson();
            onStartUp = AutoStart.IsOn();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
            //eyeXHost.Dispose();
        }
        static void Main()
        {
            if (mutex.WaitOne(TimeSpan.Zero, true))
            {
                path = Application.StartupPath + "\\" + "Settings.json";
                ReadWriteJson();

                onStartUp = AutoStart.IsOn();
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
                mutex.ReleaseMutex();
            }
            else
            {
                MessageBox.Show("There is already an instance of Gaze Toolbar running!");
            }
        }