Esempio n. 1
0
        static void Main()
        {
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            if (!EnsureSingleInstance())
            {
                return;
            }
            if (IsUpdateAvailable())
            {
                DialogResult dr = MessageBox.Show(
                    "Do you want to update now?",
                    "New version available",
                    MessageBoxButtons.YesNo,
                    MessageBoxIcon.Question);
                if (dr == DialogResult.Yes)
                {
                    Process.Start("https://github.com/akorb/SteamShutdown/releases/latest");
                }
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var applicationContext = new CustomApplicationContext();

            Application.Run(applicationContext);
        }
Esempio n. 2
0
        static void Main()
        {
            if (!EnsureSingleInstance())
            {
                return;
            }

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var applicationContext = new CustomApplicationContext();

            Application.Run(applicationContext);
        }