public static NotifyItem NotifyManually(string message) { var ni = new NotifyItem(message); using (notifyLock.GetWriterLock()) { notificationStack.Push(ni); } UpdateFocus(); return ni; }
public static NotifyItem NotifyManually(string message) { var ni = new NotifyItem(message, true); using (notifyLock.GetWriterLock()) { notificationStack.Push(ni); } UpdateFocus(); return(ni); }
/// <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(); }
/// <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(); }