示例#1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            if (e.Args.Length > 0)
            {
                _isUpdateUpdater = Convert.ToBoolean(e.Args[0]);
            }

#if !DEBUG
            var checkUpdates = CheckUpdates.Check(App.Version, _isUpdateUpdater, ScreamControl.Controller.Properties.Settings.Default.IsStealthMode);
            checkUpdates.Wait();
            if (!checkUpdates.Result)
            {
                this.Shutdown();
            }
#endif

            Language = ScreamControl.Controller.Properties.Settings.Default.CurrentLanguage;
            MainWindow window = new MainWindow();
            window.DataContext = new MainViewModel();
            window.Show();
        }
示例#2
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            Trace.TraceInformation("Scream Control startup...");
            Trace.Indent();

            if (e.Args.Length > 0)
            {
                foreach (string item in e.Args)
                {
                    switch (item)
                    {
                    case "d":
                        _isDebugMode = true;
                        break;

                    default:
                        _isUpdateUpdater = Convert.ToBoolean(item);
                        break;
                    }
                }
            }

            #if !DEBUG
            var checkUpdates = CheckUpdates.Check(App.Version, _isUpdateUpdater, ScreamControl.Client.Properties.Settings.Default.IsStealthMode, _isDebugMode);
            checkUpdates.Wait();
            if (!checkUpdates.Result)
            {
                this.Shutdown();
            }
            #endif

            Language = ScreamControl.Client.Properties.Settings.Default.CurrentLanguage;
            MainWindow window = new MainWindow(_isDebugMode);
            window.DataContext = new MainViewModel();
            window.Show();

            Trace.Unindent();
            Trace.TraceInformation("... Done");
        }