/// <summary> /// Destroys the notification object to ensure the window is closed when control exits. /// </summary> private void DestroyTip() { lock (this.mlockObject) { if (this.mTip != null) { this.mTip.HideNotification(); this.mTip.CloseInvokedByParent(); this.mTip = null; } } }
/// <summary> /// Destroys the notification object to ensure the window is closed when control exits. /// </summary> private void DestroyTip() { lock (_lockObject) { if (_Tip != null) { _Tip.HideNotification(); _Tip.CloseInvokedByParent(); _Tip = null; } } }
/// <summary> /// Shows a notification warning to the user to clarify the current application behavior. /// </summary> /// <param name="title"></param> /// <param name="message"></param> /// <param name="notifiedFromViewmodel"></param> private void ShowNotification(string title, string message, bool notifiedFromViewmodel) { lock (this.mlockObject) { this.mDestroyNotificationOnFocusChange = notifiedFromViewmodel; if (this.mTip == null) { this.mTip = new SimpleNotificationWindow(); var ownerWindow = this.GetDpObjectFromVisualTree(this, typeof(Window)) as Window; this.mTip.Owner = ownerWindow; } NotificationViewModel vm = new NotificationViewModel() { Title = (string.IsNullOrEmpty(title) ? InplaceEditBoxLib.Local.Strings.STR_MSG_InvalidChar_TITLE : title), Message = message, IsTopmost = false }; this.mTip.ShowNotification(vm, this); } }