示例#1
0
        static void Main()
        {
            CoolShotApplicationContext applicationContext = null;
            if (mutex.WaitOne(TimeSpan.Zero, true))
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                applicationContext = new CoolShotApplicationContext();
                Application.Run(applicationContext);

                mutex.ReleaseMutex();
            }
            else {
                MessageBox.Show("CoolShot is running!");
            }
        }
示例#2
0
        static void Main()
        {
            CoolShotApplicationContext applicationContext = null;

            if (mutex.WaitOne(TimeSpan.Zero, true))
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                applicationContext = new CoolShotApplicationContext();
                Application.Run(applicationContext);

                mutex.ReleaseMutex();
            }
            else
            {
                MessageBox.Show("CoolShot is running!");
            }
        }