Пример #1
0
 static void OnAppClosing()
 {
     if (Interlocked.CompareExchange(ref _appClosingFlag, 1, 0) == 0)
     {
         if (_appClosingHandler != null)
         {
             var args = new AppClosingEventArgs(_shutdownType);
             _appClosingHandler(null, args);
             if (!args.Cancel)
             {
                 Cancel();
             }
             else
             {
                 _shutdownType = ShutdownType.AppCompleted;
                 Interlocked.Exchange(ref _appClosingFlag, 0);
             }
         }
     }
 }
Пример #2
0
 internal void _View_AppClosing(IAppView sender, AppClosingEventArgs ea)
 {
     throw new Exception("The method or operation is not implemented.");
 }