Example #1
0
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     if (wasLocked & ((e.Reason == DeactivationReason.ApplicationAction) | (e.Reason == DeactivationReason.UserAction)))
     {
         this.Terminate();
     }
 }
Example #2
0
 public void Deactivated(object sender, DeactivatedEventArgs e)
 {
     // save state
     double vscroll = ListBoxOne.GetVerticalScrollOffset();
     Configuration.SaveStateSetting<object>("DataContext", DataContext);
     Configuration.SaveStateSetting<double>("VScrollPosition", vscroll);
 }
Example #3
0
 void appService_Deactivated(object sender, DeactivatedEventArgs e)
 {
     string key = "pause";
     if (appService.State.ContainsKey(key))
         appService.State[key] = Manager.manager.pause;
     else
         appService.State.Add(key,Manager.manager.pause);
 }
Example #4
0
        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
        {
			if (_vm != null)
            {
                var phoneApplicationPage = RootFrame.Content as PhoneApplicationPage;
                if (phoneApplicationPage != null)
                    _vm = (VMBase)phoneApplicationPage.DataContext;
            }
        }
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     // get a tombstonedata item...
     TombstoneData data = TombstoneData.GetTombstoneItem("UserToken", true);
     if (data == null)
         throw new InvalidOperationException("'data' is null.");
     data.Value = RestServiceProxy.Token;
     data.SaveChanges();
 }
Example #6
0
 // Código para ejecutar cuando la aplicación se desactiva (se envía a segundo plano)
 // Este código no se ejecutará cuando la aplicación se cierre
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     var viewModelLocatorService = Current.Resources["ViewModelLocator"] as ViewModelLocator;
     if (viewModelLocatorService != null)
     {
         viewModelLocatorService.MainViewModel.SaveRecipesToIs();
         viewModelLocatorService.MainViewModel.UpdateTile();
     }
 }
Example #7
0
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     CameraExplorer.DataContext d = CameraExplorer.DataContext.Singleton;
     if (d.Device != null)
     {
         d.Device.Dispose();
         d.Device = null;
     }
 }
        // Code to execute when the application is deactivated (sent to background)
        // This code will not execute when the application is closing
        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
        {
            Debug.WriteLine("App is deactivating");
            if (OnNewTilePinned != null)
            {
                OnNewTilePinned();
                OnNewTilePinned = null;
            }

        }
Example #9
0
        public void Deactivated(object sender, DeactivatedEventArgs e)
        {
            Configuration.SaveStateSetting<int>("SelectedPivot", pivot.SelectedIndex);

            if (pivot.SelectedItem != null && pivot.SelectedItem is PivotItem)
            {
                PivotItem selectedItem = (PivotItem)pivot.SelectedItem;
                if (selectedItem.Content != null && selectedItem.Content is NavigationPanel)
                {
                    ((NavigationPanel)selectedItem.Content).Deactivated(sender, e);
                }
            }
        }
        // Code to execute when the application is deactivated (sent to background)
        // This code will not execute when the application is closing
        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
        {
            // Ensure that required application state is persisted here.
            // If there is data in the application member variable...
            if (!string.IsNullOrEmpty(ApplicationDataObject))
            {
                // Store it in the State dictionary.
                PhoneApplicationService.Current.State["ApplicationDataObject"] = ApplicationDataObject;

                // Also store it in isolated storage, in case the application is never reactivated.
                SaveDataToIsolatedStorage("Quran360DataFile.txt", ApplicationDataObject);
            }
        }
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     // Ensure that required application state is persisted here.
 }
Example #12
0
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     UnityPlayer.UnityApp.Deactivate();
 }
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void ApplicationDeactivated(object sender, DeactivatedEventArgs e)
 {
     SaveSettings();
 }
Example #14
0
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     BlobCache.UserAccount.Flush().Wait();
 }
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     Countly.EndSession();
 }
Example #16
0
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     PhoneApplicationService.Current.UserIdleDetectionMode = OriginalIdleMode;
 }
Example #17
0
        void AppDeactivated(object sender, DeactivatedEventArgs e)
        {
            Debug.WriteLine("AppDeactivated");

            try
            {
                GapBrowser.InvokeScript("PhoneGapCommandResult", new string[] { "pause" });
            }
            catch (Exception)
            {
                Debug.WriteLine("Pause event error");
            }
        }
Example #18
0
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     LampDevice.Dispose();
 }
Example #19
0
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     Debug.WriteLine("Application_Deactivated Called");
     SpawnLightstreamerClientStop();
 }
Example #20
0
        // Code to execute when the application is deactivated (sent to background)
        // This code will not execute when the application is closing
        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
        {
            //Try to save collections, in case we are terminated
            AppContext.CurrentUser.TrySaveCollectedHighlightsLocally();

            //Anything else?
        }
Example #21
0
        // Code to execute when the application is deactivated (sent to background)
        // This code will not execute when the application is closing
        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
        {
            timer.Start();

            geo.Start();
        }
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     DeactivatedTime = DateTime.Now;
     PhoneApplicationService.Current.State["DeactivatedTime"] = DeactivatedTime;
     PhoneApplicationService.Current.State["LaunchingTime"] = LaunchedTime;
 }
Example #23
0
        void AppDeactivated(object sender, DeactivatedEventArgs e)
        {
            Debug.WriteLine("INFO: AppDeactivated");

            try
            {
                CordovaBrowser.InvokeScript("CordovaCommandResult", new string[] { "pause" });
            }
            catch (Exception)
            {
                Debug.WriteLine("ERROR: Pause event error");
            }
        }
Example #24
0
        // Code to execute when the application is deactivated (sent to background)
        // This code will not execute when the application is closing
        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
        {
            IDictionary<string, object> state =
                PhoneApplicationService.Current.State;

            if (state.ContainsKey("Model"))
            {
                Model = (Model.DataModel)state["Model"];
            }
        }
Example #25
0
        void AppDeactivated(object sender, DeactivatedEventArgs e)
        {
            Debug.WriteLine("INFO: AppDeactivated");

            try
            {
                CordovaBrowser.InvokeScript("eval", new string[] { "cordova.fireDocumentEvent('pause');" });
            }
            catch (Exception)
            {
                Debug.WriteLine("ERROR: Pause event error");
            }
        }
Example #26
0
 private void OnDeactivated(object s, DeactivatedEventArgs e)
 {
     this.IsBeingDeactivated();
 }
Example #27
0
 /// <summary>
 /// Occurs when the application is being tombstoned or paused.
 /// </summary>
 protected virtual void OnDeactivate(object sender, DeactivatedEventArgs e) { }
Example #28
0
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
     // Ensure that required application state is persisted here.
       //  App._viewModel.LoadData();
 }
 // Code to execute when the application is deactivated (sent to background)
 // This code will not execute when the application is closing
 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
 {
 }
Example #30
0
        // Code to execute when the application is deactivated (sent to background)
        // This code will not execute when the application is closing
        private void Application_Deactivated(object sender, DeactivatedEventArgs e)
        {
            ViewModels.ViewModelLocator locator = Resources["Locator"] as ViewModels.ViewModelLocator;
            if (locator == null)
            {
                throw new NullReferenceException("locator is null!");
            }

            locator.SaveDataToApplicationState();

            //Save currentUri state
            SaveCurrentUriToApplicationState();
        }