示例#1
0
        public App()
        {
            Instance = this;

            var success = this.LockDuplicateStart();

            if (!success)
            {
                MessageBox.Show(
                    "既に起動しています。",
                    "RINGS",
                    MessageBoxButton.OK,
                    MessageBoxImage.Information);

                Environment.Exit(0);
            }

            AppLogger.Init("RINGSLogger");

            SplashOverlay.Instance.ShowSplash();

            ServicePointManager.SecurityProtocol &= ~SecurityProtocolType.Tls;
            ServicePointManager.SecurityProtocol &= ~SecurityProtocolType.Tls11;
            ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;

            this.DispatcherUnhandledException += this.App_DispatcherUnhandledException;
            this.Startup += this.App_Startup;
            this.Exit    += this.App_Exit;

            this.ShutdownMode = ShutdownMode.OnMainWindowClose;

            // Help にAppLogを登録する
            AppLogger.OnWrite += (_, e) => HelpViewModel.Instance.AddLog(e);
        }
示例#2
0
        public App()
        {
            this.DispatcherUnhandledException += this.App_DispatcherUnhandledException;
            this.Startup += this.App_Startup;
            this.Exit    += this.App_Exit;

            this.ShutdownMode = ShutdownMode.OnMainWindowClose;

            AppLogger.Init("madokaLog");
        }