コード例 #1
0
ファイル: App.xaml.cs プロジェクト: ITSF/WP8Book
        // 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"];
            }
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: GregOnNet/WP8BookSamples
        // 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"];
            }
        }