示例#1
0
 public static NotifyItem NotifyManually(string message)
 {
     var ni = new NotifyItem(message);
     using (notifyLock.GetWriterLock())
     {
         notificationStack.Push(ni);
     }
     UpdateFocus();
     return ni;
 }
示例#2
0
        public static NotifyItem NotifyManually(string message)
        {
            var ni = new NotifyItem(message, true);

            using (notifyLock.GetWriterLock())
            {
                notificationStack.Push(ni);
            }
            UpdateFocus();
            return(ni);
        }
示例#3
0
 /// <summary>
 /// 現在のフォーカスアイテムを変更します。
 /// </summary>
 private static void UpdateFocus()
 {
     if (prevChain != null)
         prevChain.StateChanged -= CallbackStateChanged;
     using (notifyLock.GetReaderLock())
     {
         if (notificationStack.Count == 0)
             prevChain = null;
         else
             prevChain = notificationStack.Peek();
     }
     if (prevChain != null)
         prevChain.StateChanged += CallbackStateChanged;
     // 最後に状態更新して終わり
     CallbackStateChanged();
 }
示例#4
0
 /// <summary>
 /// 現在のフォーカスアイテムを変更します。
 /// </summary>
 private static void UpdateFocus()
 {
     if (prevChain != null)
     {
         prevChain.StateChanged -= CallbackStateChanged;
     }
     using (notifyLock.GetReaderLock())
     {
         if (notificationStack.Count == 0)
         {
             prevChain = null;
         }
         else
         {
             prevChain = notificationStack.Peek();
         }
     }
     if (prevChain != null)
     {
         prevChain.StateChanged += CallbackStateChanged;
     }
     // 最後に状態更新して終わり
     CallbackStateChanged();
 }