Ejemplo n.º 1
0
 void OnServiceClosing(object sender, ClosingEventArgs e)
 {
     using (IsolatedStorageFileStream file = new IsolatedStorageFileStream("debugOutput.txt", FileMode.Append, FileAccess.Write, IsolatedStorageFile.GetUserStoreForApplication()))
     {
         using (StreamWriter writeFile = new StreamWriter(file))
         {
             writeFile.WriteLine("EXIT");
             writeFile.Close();
         }
         file.Close();
     }
 }
Ejemplo n.º 2
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)
 {
     //Try to save collections, in case we are terminated
     AppContext.CurrentUser.TrySaveCollectedHighlightsLocally();
 }
Ejemplo n.º 3
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)
 {
     mtiks.Instance.Stop();
 }
Ejemplo 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)
 {
     AppManager.Instance.Close();
 }
Ejemplo n.º 5
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)
        {
            IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;

            String image = CustomBrush1.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if(settings.Contains("CustomBrush1"))
                {
                    settings["CustomBrush1"]=CustomBrush1;
                }
                else
                {
                    settings.Add("CustomBrush1", CustomBrush1);
                }
            }

            image = CustomBrush2.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush2"))
                {
                    settings["CustomBrush2"] = CustomBrush2;
                }
                else
                {
                    settings.Add("CustomBrush2", CustomBrush2);
                }
            }

            image = CustomBrush3.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush3"))
                {
                    settings["CustomBrush3"] = CustomBrush3;
                }
                else
                {
                    settings.Add("CustomBrush3", CustomBrush3);
                }
            }

            image = CustomBrush4.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush4"))
                {
                    settings["CustomBrush4"] = CustomBrush4;
                }
                else
                {
                    settings.Add("CustomBrush4", CustomBrush4);
                }
            }

            image = CustomBrush5.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush5"))
                {
                    settings["CustomBrush5"] = CustomBrush5;
                }
                else
                {
                    settings.Add("CustomBrush5", CustomBrush5);
                }
            }

            image = CustomBrush6.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush6"))
                {
                    settings["CustomBrush6"] = CustomBrush6;
                }
                else
                {
                    settings.Add("CustomBrush6", CustomBrush6);
                }
            }

            settings.Save();
        }
Ejemplo n.º 6
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)
 {
     // The application will not be tombstoned, so save only to isolated storage.
     if (!string.IsNullOrEmpty(ApplicationDataObject))
     {
         SaveDataToIsolatedStorage("Quran360DataFile.txt", ApplicationDataObject);
     }
 }
Ejemplo 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)
 {
     UnityPlayer.UnityApp.Quit();
 }
Ejemplo n.º 8
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)
 {
     BlobCache.UserAccount.Flush().Wait();
 }
 // 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)
 {
     Appboy.SharedInstance.CloseSession();
 }
Ejemplo 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)
 {
     // No need to store to the state object - we are not coming back
     SaveToIsolatedStorage();
 }
Ejemplo n.º 11
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();
 }
Ejemplo 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)
 {
     App.Client.Dispose();
 }
Ejemplo n.º 13
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)
 {
     // When the application closes, delete any deactivation settings from isolated storage
     RemoveCurrentDeactivationSettings();
 }
Ejemplo n.º 14
0
 void OnClosing(object sender, ClosingEventArgs e)
 {
     Save(StorageMode.Permanent);
 }
Ejemplo 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)
 {
     PhoneApplicationService.Current.UserIdleDetectionMode = OriginalIdleMode;
 }
Ejemplo 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
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     Countly.EndSession();
 }
Ejemplo n.º 17
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)
 {
     System.Diagnostics.Debug.WriteLine("Application_Closing");
 }
Ejemplo n.º 18
0
 // 应用程序关闭(例如,用户点击“后退”)时执行的代码
 // 此代码在停用应用程序时不执行
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     SaveData();
     SaveSettings();
     update.UpdateTiles();
 }
Ejemplo 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)
 {
     AccelerometerHelper.Instance.IsActive = false;
 }
Ejemplo n.º 20
0
 // Код для выполнения при закрытии приложения (например, при нажатии пользователем кнопки "Назад")
 // Этот код не будет выполняться при деактивации приложения
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     if (!Session.RememberSession)
         Session.CurrentSession = null;
 }
Ejemplo 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)
 {
     UnityPlayer.UnityApp.Quit();
 }
Ejemplo 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)
 {
     SaveFavorites();
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Code to execute when the application is closing (eg, user hit <c>Back</c>).<br/>
 /// This code will not execute when the application is deactivated.
 /// </summary>
 /// <param name="sender">Event sender.</param>
 /// <param name="e">The <see cref="ClosingEventArgs"/> instance containing the event data.</param>
 private void ApplicationClosing(object sender, ClosingEventArgs e)
 {
     ViewModelLocator.Cleanup();
 }
Ejemplo 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)
 {
     BrightstarService.Shutdown(true);
 }
Ejemplo n.º 25
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.
 }
Ejemplo n.º 26
0
		/// <summary>
		/// Overridden to prevent closing the <see cref="Workspace"/> if <see cref="UserClosable"/> is false.
		/// </summary>
		protected override void OnClosing(ClosingEventArgs args)
		{
			var parentClosing = (args.Reason & CloseReason.ParentClosing) == CloseReason.ParentClosing;
			var userClosing = (args.Reason & CloseReason.UserInterface) == CloseReason.UserInterface;

			if (userClosing && !parentClosing && !_userClosable)
			{
				// the user is attempting to close this workspace (not the parent window), but it is not user-closable
				// cancel the close, and do not call the base class (do not fire the event publicly)
				args.Cancel = true;

				return;
			}

			base.OnClosing(args);
		}
 void AppClosing(object sender, ClosingEventArgs e)
 {
     Debug.WriteLine("AppClosing");
 }
Ejemplo n.º 28
0
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     LampDevice.Dispose();
 }
Ejemplo n.º 29
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)
 {
 }
Ejemplo n.º 30
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)
 {
     SaveSettings();
 }
Ejemplo n.º 31
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)
        {
            // Dispose ViewModels
            var viewModelLocator = this.Resources["ViewModelLocator"] as ViewModelLocator;
            if (viewModelLocator != null) viewModelLocator.Dispose();

            // Close connection to relay service
            //EveWindowsPhone.Pages.Main.MainView.client.CloseAsync();
        }
Ejemplo n.º 32
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)
 {
     ViewModelLocator.Cleanup();
 }
Ejemplo n.º 33
0
 // 应用程序关闭(例如,用户点击“后退”)时执行的代码
 // 此代码在停用应用程序时不执行
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     // 确保所需的应用程序状态在此处保持不变。
 }
Ejemplo n.º 34
0
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     Debug.WriteLine("Application_Closing Called");
     SpawnLightstreamerClientStop();
 }
Ejemplo n.º 35
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("App is closing");
            if (OnNewTilePinned != null)
            {
                OnNewTilePinned();
                OnNewTilePinned = null;
            }

        }
Ejemplo n.º 36
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.
 }
 // 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.
     var vml = Resources["Locator"] as ViewModelLocator;
     vml.SaveState();
 }
Ejemplo n.º 38
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 ApplicationClosing(object sender, ClosingEventArgs e)
 {
     SaveSettings();
     ViewModelLocator.Cleanup();
 }
Ejemplo n.º 39
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)
 {
     using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication())
     {
         using (IsolatedStorageFileStream fs = storage.CreateFile(LogFile))
         {
             using (StreamWriter writer = new StreamWriter(fs))
             {
                 Logger.Save(writer);
             }
         }
     }
 }
Ejemplo n.º 40
0
 // (たとえば、ユーザーが戻るボタンを押して) アプリケーションが終了するときに実行されるコード
 // このコードは、アプリケーションが非アクティブになっているときには実行されません
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     // 必要なアプリケーションの状態が持続していることをここで確認します。
 }
Ejemplo n.º 41
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.SaveCurrentPuzzleId();
 }
Ejemplo n.º 42
0
 /// <summary>
 /// Occurs when the application is closing.
 /// </summary>
 protected virtual void OnClose(object sender, ClosingEventArgs e) { }
Ejemplo n.º 43
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)
 {
     if (db != null)
     {
         db.closeDatabase();
     }
     App.ViewModel.SaveRecents();
 }
Ejemplo n.º 44
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)
 {
 }
Ejemplo n.º 45
0
 // 应用程序关闭(例如,用户点击“后退”)时执行的代码
 // 此代码在停用应用程序时不执行
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     App.DownVideoModel.SaveVideoData();
 }