Catrobat.IDE.WindowsPhone.ExtendedSplash.RestoreCatrobatStateAsync C# (CSharp) Method

RestoreCatrobatStateAsync() private method

private RestoreCatrobatStateAsync ( ApplicationExecutionState executionState ) : System.Threading.Tasks.Task
executionState ApplicationExecutionState
return System.Threading.Tasks.Task
        private async Task RestoreCatrobatStateAsync(ApplicationExecutionState executionState)
        {
            await ((SystemInformationServiceWindowsShared)ServiceLocator.SystemInformationService).Initialize();

            if (ViewModelBase.IsInDesignModeStatic)
                return;

            if (executionState == ApplicationExecutionState.NotRunning ||
                executionState == ApplicationExecutionState.ClosedByUser ||
                executionState == ApplicationExecutionState.Terminated)
            {
                Core.App.SetNativeApp(Application.Current.Resources["App"]
                    as AppWindowsShared);
                ServiceLocator.Register(new DispatcherServiceWindowsShared(Dispatcher));
                await Core.App.Initialize();
                //ServiceLocator.Register(new DispatcherServiceWindowsShared(Dispatcher));

                //var width = ServiceLocator.SystemInformationService.ScreenWidth; // preload width
                //var height = ServiceLocator.SystemInformationService.ScreenHeight; // preload height

                var image = new BitmapImage(
                    new Uri("ms-appx:///Content/Images/Screenshot/NoScreenshot.png",
                        UriKind.Absolute))
                {
                    CreateOptions = BitmapCreateOptions.None
                };

                ManualImageCache.NoScreenshotImage = image;
            }

            await InitializationFinished(_activationArguments);
        }