Пример #1
0
 private static void UpdateNotificationMessage()
 {
     if (Core.State == CoreState.ShuttingDown)
     {
         return;
     }
     lock ( _nextMessages )
     {
         SkipDeletedResources();
         if (_nextMessages.Count == 0)
         {
             return;
         }
     }
     if (_theMessage == null)
     {
         _theMessage = new NotificationMessageDlg();
         _theMessage.ShowCurrentNotificationMessage();
         _theMessage.ShowDialog(Core.MainWindow);
     }
     else
     {
         _theMessage.UpdateReadNextButton();
     }
 }
Пример #2
0
 private void NotificationMessageDlg_Closed(object sender, System.EventArgs e)
 {
     lock ( _nextMessages )
     {
         _nextMessages.Clear();
         _nextResources.Clear();
     }
     _theMessage = null;
     Dispose();
 }
Пример #3
0
 private static void DelayedExec(IResource res, string message)
 {
     if (Core.State == CoreState.Running)
     {
         NotificationMessageDlg.QueueNotificationMessage(res, message);
     }
     else if (Core.State != CoreState.ShuttingDown)
     {
         Core.ResourceAP.QueueJobAt(DateTime.Now.AddSeconds(10),
                                    new ShowMessageDelegate(DelayedExec), res, message);
     }
 }