/// <summary>
        /// Is called just before the application is shut down.
        /// </summary>
        /// <param name="e">The event arguments that contain more information about the application shutdown.</param>
        protected override void OnExit(ExitEventArgs e)
        {
            // Calls the base implementation of this method
            base.OnExit(e);

            // Calls the on exit event handler, where the user is able to do custom shutdown operations
            this.OnExitAsync().Wait();

            // Calls the dispose method of the application
            this.Dispose(true);
        }
示例#2
0
 private void shell_Exit(object sender, ExitEventArgs e)
 {
     Environment.ExitCode = e.ExitCode;
     if (InvokeRequired)
     {
         Invoke((MethodInvoker)Close);
     }
     else
     {
         Close();
     }
 }
示例#3
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     db.Dispose();
 }
示例#4
0
 void App_Exit(object sender, ExitEventArgs e)
 {
 }
示例#5
0
 /// <summary>
 /// Notify the application about closing procedure
 /// </summary>
 /// <param name="e"></param>
 protected override void OnExit(ExitEventArgs e)
 {
     DI.Application.Close();
 }
示例#6
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     ArgsImporter.Dispose();
 }
示例#7
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     _trayIcon.Close();
     KeyboardListener.UnRegister();
     AppleKeyboardHID2.Shutdown();
 }
示例#8
0
 protected override async void OnExit(ExitEventArgs e)
 {
     await _applicationBootstrapper.OnExitAsync().ConfigureAwait(true);
 }
 private async void Application_Exit(object sender, ExitEventArgs e)
 {
     TrayIconService.Close();
     await SettingsService.Default.SaveAsync();
 }
示例#10
0
 protected override void OnExit(ExitEventArgs e)
 {
     appServices.Shutdown(e.ApplicationExitCode);
     base.OnExit(e);
 }
示例#11
0
        private void Application_Exit(object sender, ExitEventArgs e)
        {
            var logger = _container.Resolve <ILogger>();

            logger.Close();
        }
示例#12
0
 protected override void OnExit(ExitEventArgs e)
 {
     _instance?.ReleaseMutex();
     base.OnExit(e);
 }
示例#13
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
 }
示例#14
0
 protected override void OnExit(ExitEventArgs e)
 {
     bootstrapper.Shutdown();
     base.OnExit(e);
 }
示例#15
0
 protected override void OnExit(ExitEventArgs e)
 {
     TfsTeamProjectCollectionCache.ClearCache();
     this.logger.Log("Application exited", TraceEventType.Information);
     base.OnExit(e);
 }
		protected virtual void OnExit(ExitEventArgs args)
		{
			var exit = this.Exit;

			if(exit != null)
				exit(this, args);
		}
示例#17
0
 protected override void OnExit(ExitEventArgs e)
 {
     AppComThread.Instance.Dispose();
     base.OnExit(e);
 }
示例#18
0
 static void app_Exit(object sender, ExitEventArgs e)
 {
     MessageBox.Show("" + e.ApplicationExitCode);
 }
示例#19
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     m_dataContext.ProcessPropertyChange();
     m_dataContext.SaveSettings();
 }
示例#20
0
        protected override void OnExit(ExitEventArgs e)
        {
            nIcon.Visible = false;

            base.OnExit(e);
        }
示例#21
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     CleanShutdown();
 }
示例#22
0
 static void AppExit(object sender, ExitEventArgs e)
 {
     MessageBox.Show("App has exited");
 }
示例#23
0
 /// <summary>
 /// Called when [application exit].
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="ExitEventArgs"/> instance containing the event data.</param>
 private void OnApplicationExit(object sender, ExitEventArgs e)
 {
     try { Dispose(); }
     catch { /* Ignore exception and continue */ }
 }
示例#24
0
 private void App_Exit(object sender, ExitEventArgs e)
 {
     // Hide icon when exit
     trayicon.Visible = false;
 }
示例#25
0
 /// <summary>
 /// Occurs when the application exits.
 /// </summary>
 protected override void OnExit(ExitEventArgs e)
 {
     SaveRecentFiles();
     base.OnExit(e);
 }
示例#26
0
 protected override void OnExit(ExitEventArgs e)
 {
     base.OnExit(e);
     _appRunner.Stop();
 }
示例#27
0
 protected override void OnExit(ExitEventArgs _)
 {
     LogGrok.Resources.Properties.Settings.Default.Save();
     Logger.FlushAll();
 }
示例#28
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     PTO_Emailer.Properties.Settings.Default.Save();
 }
示例#29
0
 // System.Windows.Application.Startupイベントを発生
 protected override void OnExit(ExitEventArgs e)
 {
     base.OnExit(e);
     this.notifyIcon.Dispose();
 }
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     AppMAnager.DisposeNotIcon();
 }
示例#31
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     ApplicationContext.Global.Close();
 }
		private bool RaiseExit(int exitCode)
		{
			var args = new ExitEventArgs(exitCode);

			//激发“Exit”退出事件
			this.OnExit(args);

			return !args.Cancel;
		}
示例#33
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     CloseSession();
 }
示例#34
0
        private void onExitEvent(object sender, ExitEventArgs args)
        {
            // Fire exiting event, allowing presenters to cancel.
            ExitingEventArgs e = new ExitingEventArgs();
            services.EventBus.FireEvent(this, e);

            if (!e.Cancel)
            {
                // Exiting event not canceled.
                // Exit application.
                Application.Exit();
            }
        }
示例#35
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     CH341_Test.Properties.Settings.Default.Save();
 }