コード例 #1
0
ファイル: App.xaml.cs プロジェクト: 7ung/LanguageDetectApp
        protected async override void OnActivated(IActivatedEventArgs e)
        {
            base.OnActivated(e);

            ContinuationManager = new ContinuationManager();

            Frame rootFrame = CreateRootFrame();

            await RestoreStatusAsync(e.PreviousExecutionState);

            if (rootFrame.Content == null)
            {
                rootFrame.Navigate(typeof(ImageRecognizePage));
            }

            var continuationEventArgs = e as IContinuationActivatedEventArgs;

            if (continuationEventArgs != null)
            {
                //Frame scenarioFrame = MainPage.Current.FindName("ScenarioFrame") as Frame;
                if (rootFrame != null)
                {
                    // Call ContinuationManager to handle continuation activation
                    ContinuationManager.Continue(continuationEventArgs, rootFrame);
                }
            }

            Window.Current.Activate();
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: 7ung/LanguageDetectApp
        protected async override void OnActivated(IActivatedEventArgs e)
        {
            base.OnActivated(e);

            ContinuationManager = new ContinuationManager();

            Frame rootFrame = CreateRootFrame();
            await RestoreStatusAsync(e.PreviousExecutionState);

            if (rootFrame.Content == null)
            {
                rootFrame.Navigate(typeof(ImageRecognizePage));
            }

            var continuationEventArgs = e as IContinuationActivatedEventArgs;
            if (continuationEventArgs != null)
            {
                //Frame scenarioFrame = MainPage.Current.FindName("ScenarioFrame") as Frame;
                if (rootFrame != null)
                {
                    // Call ContinuationManager to handle continuation activation
                    ContinuationManager.Continue(continuationEventArgs, rootFrame);
                }
            }

            Window.Current.Activate();

        }