Beispiel #1
0
        // Code to execute when the application is activated (brought to foreground)
        // This code will not execute when the application is first launched
        private void Application_Activated(object sender, ActivatedEventArgs e)
        {
            if (e.IsApplicationInstancePreserved)
            {
                // App wurde im Speicher gehalten => nichts unternehmen
                App.WasAppDormant = true;
                return;
            }

            App.WasAppDormant = false;
            // Status wiederherstellen
            if (PhoneApplicationService.Current.State.ContainsKey("SelectedTweet"))
            {
                App.SelectedTweet = (TwitterItem)PhoneApplicationService.Current.State["SelectedTweet"];
            }
        }
Beispiel #2
0
        // Code to execute when the application is activated (brought to foreground)
        // This code will not execute when the application is first launched
        private void Application_Activated(object sender, ActivatedEventArgs e)
        {
            if (e.IsApplicationInstancePreserved)
            {
                // App wurde im Speicher gehalten => nichts unternehmen
                App.WasAppDormant = true;
                return;
            }

            App.WasAppDormant = false;
            // Status wiederherstellen
            if (PhoneApplicationService.Current.State.ContainsKey("SelectedTweet"))
            {
                App.SelectedTweet = (TwitterItem)PhoneApplicationService.Current.State["SelectedTweet"];
            }
        }