Esempio n. 1
0
 public IReadOnlyList<string> UnsavedChanges() {
     var args = new ClosingEventArgs();
     Logging.Debug(args);
     Closing?.Invoke(this, args);
     Logging.Debug(args.UnsavedDisplayNames.JoinToString(";"));
     return args.UnsavedDisplayNames;
 }
Esempio n. 2
0
 public void Closing(object sender, ClosingEventArgs e)
 {
     if (pivot.SelectedItem != null && pivot.SelectedItem is PivotItem)
     {
         PivotItem selectedItem = (PivotItem)pivot.SelectedItem;
         if (selectedItem.Content != null && selectedItem.Content is NavigationPanel)
         {
             ((NavigationPanel)selectedItem.Content).Closing(sender, e);
         }
     }
 }
        void MainWindowClosing(object sender, ClosingEventArgs e) {
            if (actuallyClosing)
                return;

            e.Cancel = true;

            Execute.OnUIThread(() => {
                var shell = IoC.Get<IShell>();

                shell.CanClose(result => {
                    if(result) {
                        actuallyClosing = true;
                        mainWindow.Close();
                    }
                });
            });
        }
Esempio n. 4
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     Debug.WriteLine("CLOSING");
     using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
     {
         if (myIsolatedStorage.FileExists(SerialStore))
         {
             myIsolatedStorage.DeleteFile(SerialStore);
         }
     }
 }
		// when app gets tombstoned, user press back past first page
		async void OnClosing(object sender, ClosingEventArgs e)
		{
			// populate isolated storage.
			//SerializePropertyStore ();
			await _application.SendSleepAsync();
		}
 protected override void OnClose(object sender, ClosingEventArgs e)
 {
     // When the application closes, delete any deactivation settings from isolated storage
     RemoveCurrentDeactivationSettings();
 }
Esempio n. 7
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     LogInstance.LogInfo("Application is closing");
 }
Esempio n. 8
0
 void AppClosing(object sender, ClosingEventArgs e)
 {
     //Debug.WriteLine("AppClosing");
 }
Esempio n. 9
0
		/// <summary>
		/// Closes this object.
		/// </summary>
		/// <returns>True if the object was closed, otherwise false.</returns>
		protected internal bool Close(UserInteraction interactive, CloseReason reason)
		{
			// easy case - bail if interaction is prohibited and we can't close without interacting
			if (interactive == UserInteraction.NotAllowed && !CanClose())
				return false;

			// either we can close without interacting, or interaction is allowed, so let's try and close

			// begin closing - the operation may yet be cancelled
			_state = DesktopObjectState.Closing;

			ClosingEventArgs args = new ClosingEventArgs(reason, interactive);
			OnClosing(args);

			if (args.Cancel || !PrepareClose(reason))
			{
				_state = DesktopObjectState.Open;
				return false;
			}

			_view.CloseRequested -= OnViewCloseRequested;
			_view.VisibleChanged -= OnViewVisibleChanged;
			_view.ActiveChanged -= OnViewActiveChanged;

			// notify inactive
			this.Active = false;

			try
			{
				// close the view
				_view.Dispose();
			}
			catch (Exception e)
			{
				Platform.Log(LogLevel.Error, e);
			}
			_view = null;

			// close was successful
			_state = DesktopObjectState.Closed;
			OnClosed(new ClosedEventArgs(reason));

			// dispose of this object after firing the Closed event
			// (reason being that handlers of the Closed event may expect this object to be intact)
			(this as IDisposable).Dispose();

			return true;
		}
Esempio n. 10
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     this.RelayContext.SaveToStorage();
 }
Esempio n. 11
0
 private void AppClosing(object sender, ClosingEventArgs e)
 {
     XLog.WriteInfo(" AppClosing");
 }
Esempio n. 12
0
        // Code to execute when the application is closing (eg, user hit Back)
        // This code will not execute when the application is deactivated
        private void Application_Closing(object sender, ClosingEventArgs e)
        {
            change_tile();

            //Obtain a virtual store for application
            IsolatedStorageFile fileStorage = IsolatedStorageFile.GetUserStoreForApplication();

            //Create new subdirectory
            fileStorage.CreateDirectory("textFiles");

            //Create a new StreamWriter, to write the file to the specified location.
            StreamWriter fileWriter = new StreamWriter(new IsolatedStorageFileStream("textFiles\\newText.txt", FileMode.OpenOrCreate, fileStorage));
            //Write the contents of our TextBox to the file.
            if (Pivot.proba) fileWriter.WriteLine(Pivot.loginn+","+Pivot.passs);
            else fileWriter.WriteLine(",");/////////////////////////////////////////////////////////////////////////////////////////////////////////////            
            // MessageBox.Show("hard ending!");
            //Close the StreamWriter.
            fileWriter.Close();
        }
Esempio n. 13
0
 public void Closing(object sender, ClosingEventArgs e)
 {
 }
        static void Application_Closing(object sender, ClosingEventArgs e)
        {
            Utils.log("Application_Closing");

            //Disable event manager
            EventManager.setEnabled(false);
        }
Esempio n. 15
0
        // Code to execute when the application is closing (eg, user hit Back)
        // This code will not execute when the application is deactivated
        private void Application_Closing(object sender, ClosingEventArgs e)
        {
            MessengerInstance.Send<MediaPlayerStopMessage>(
                new MediaPlayerStopMessage());

            logger.Info("Application closed");
        }
Esempio n. 16
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 public virtual void OnClosing(object sender, ClosingEventArgs e)
 {
 }
Esempio n. 17
0
		/// <summary>
		/// Raises the <see cref="Closing"/> event.
		/// </summary>
		protected virtual void OnClosing(ClosingEventArgs args)
		{
			EventsHelper.Fire(_closing, this, args);
		}
Esempio n. 18
0
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     EcosModel.Disconnect();
     SaveProfiles();
 }
Esempio n. 19
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     // Ensure that required application state is persisted here.
 }
Esempio n. 20
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     App.UseGps = false;
     Settings.stopGPSLocationService();
 }
Esempio n. 21
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
 }
Esempio n. 22
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     RHODESAPP().stopApp();
    // m_logThread.CancelAsync();
 }
Esempio n. 23
0
		// Code to execute when the application is closing (eg, user hit Back)
		// This code will not execute when the application is deactivated
		private void Application_Closing(object sender, ClosingEventArgs e)
		{
			MessageBoxResult result = MessageBox.Show("Encerrar aplicação?", "Sair", MessageBoxButton.OKCancel);
			switch (result)
			{
				case MessageBoxResult.OK:

					break;
				case MessageBoxResult.Cancel:
					
					break;
			}
		}
Esempio n. 24
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     Roster.Save();
     Settings.Save();
 }