예제 #1
0
 public PrismApplicationBase()
 {
     InternalInitialize();
     (this as IPrismApplicationEvents).WindowCreated += (s, e) =>
     {
         GestureService.SetupForCurrentView(e.Window.CoreWindow);
     };
     base.Suspending += async(s, e) =>
     {
         if (ApplicationData.Current.LocalSettings.Values.ContainsKey("Suspend_Data"))
         {
             ApplicationData.Current.LocalSettings.Values.Remove("Suspend_Data");
         }
         ApplicationData.Current.LocalSettings.Values.Add("Suspend_Data", DateTime.Now.ToString());
         var deferral = e.SuspendingOperation.GetDeferral();
         try
         {
             OnSuspending();
             await OnSuspendingAsync();
         }
         finally
         {
             deferral.Complete();
         }
     };
     base.Resuming += async(s, e) =>
     {
         await InternalStartAsync(new StartArgs(ResumeArgs.Create(ApplicationExecutionState.Suspended), StartKinds.Resume));
     };
 }
예제 #2
0
 public PrismApplicationBase()
 {
     InternalInitialize();
     (this as IPrismApplicationEvents).WindowCreated += (s, e)
                                                        => GestureService.SetupForCurrentView(e.Window.CoreWindow);
 }