Beispiel #1
0
 public void AddMessage(object key, EntryBase entry)
 {
     MessageQueue.Add(key, entry);
     Overlay.Dispatcher.BeginInvoke(new Action(() =>
     {
         Overlay.Show();
     }));
 }
Beispiel #2
0
 static void Message(object key, EntryBase entry)
 {
     try
     {
         if (Overlayer != null)
         {
             Overlayer.AddMessage(key, entry);
         }
     }
     catch (Exception e)
     {
         MainWindowViewModel.LogException(e);
     }
 }
Beispiel #3
0
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>   Add message. It also enables hook if it was disabled. </summary>
 ///
 /// <param name="key">      The key. </param>
 /// <param name="entry">    The entry. </param>
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 public void AddMessage(object key, EntryBase entry)
 {
     if (IsHooking == false)
     {
         // If remove it, progress event of first download request won't firing.
         ThreadPool.QueueUserWorkItem(state =>
         {
             if (IsHooking == false)
             {
                 SetHookState(true);
             }
         });
     }
     MessageQueue.Add(key, entry);
 }