Beispiel #1
0
        static void Main(string[] args)
        {
            bool  result = false;
            Mutex mutex  = new Mutex(true, "vibranceGUI~Mutex", out result);

            if (!result)
            {
                MessageBox.Show("You can run vibranceGUI only once at a time!", "vibranceGUI", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            vibranceGUI vibrance = new vibranceGUI();

            if (args.Contains("-minimized"))
            {
                vibrance.WindowState   = FormWindowState.Minimized;
                vibrance.ShowInTaskbar = false;
            }
            vibrance.silenced = args.Contains("-silenced");
            Application.Run(vibrance);

            GC.KeepAlive(mutex);
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     vibranceGUI vibrance = new vibranceGUI();
     if (args.Length == 1 && "-minimized".Equals(args[0]))
     {
         vibrance.WindowState = FormWindowState.Minimized;
         vibrance.ShowInTaskbar = false;
     }
     Application.Run(vibrance);
 }
Beispiel #3
0
        static void Main(string[] args)
        {
            bool result = false;
            Mutex mutex = new Mutex(true, "vibranceGUI~Mutex", out result);
            if (!result)
            {
                MessageBox.Show("You can run vibranceGUI only once at a time!", "vibranceGUI", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            vibranceGUI vibrance = new vibranceGUI();
            if (args.Contains("-minimized"))
            {
                vibrance.WindowState = FormWindowState.Minimized;
                vibrance.ShowInTaskbar = false;
            }
            vibrance.silenced = args.Contains("-silenced");
            Application.Run(vibrance);

            GC.KeepAlive(mutex);
        }