Exemplo n.º 1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Regulator regulator = null;
     try
     {
         regulator = new Regulator();
         TrayIcon context = new TrayIcon(regulator);
         Application.Run(context);
         regulator.Stop();
     }
     catch (Exception e)
     {
         if (regulator != null) regulator.Stop();
         MessageBox.Show(e.ToString(), "Acer7551G Fan Control", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Regulator regulator = null;

            try
            {
                regulator = new Regulator();
                TrayIcon context = new TrayIcon(regulator);
                Application.Run(context);
                regulator.Stop();
            }
            catch (Exception e)
            {
                if (regulator != null)
                {
                    regulator.Stop();
                }
                MessageBox.Show(e.ToString(), "Acer7551G Fan Control", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }