public void ShowNotificationMessage(NotificationMessage msg) { if (mainForm==null || mainForm.IsDisposed) return; mainForm.Invoke(new Action(() => { if (!mainForm.IsDisposed) { mainForm.ShowNotificationMessage(msg); } })); }
public void ShowNotificationMessage(NotificationMessage msg) { lock (notificationMessages) { notificationMessages.Add(msg); if (msg is NewVersionNotificationMessage) { newVersions = ((NewVersionNotificationMessage)msg).VersionDescriptions; } } }
private void NotifyMessage(NotificationMessage msg) { lock (messageExpireTimer) { if (messageExpireTimer.Elapsed>=MessageExpires) { lastMessage = null; messageExpireTimer.Reset(); messageExpireTimer.Start(); } if (lastMessage==null || !lastMessage.Equals(msg)) { foreach (var ui in this.app.Plugins.Where(p => p is IUserInterfacePlugin)) { ((IUserInterfacePlugin)ui).ShowNotificationMessage(msg); } lastMessage = msg; } } }
public void ShowNotificationMessage(NotificationMessage message) { if (notifyIcon==null) return; var timeout = 60000; var icon = ToolTipIcon.Info; switch (message.Type) { case NotificationMessageType.Normal: icon = ToolTipIcon.None; timeout = 30000; break; case NotificationMessageType.Info: icon = ToolTipIcon.Info; break; case NotificationMessageType.Warning: icon = ToolTipIcon.Warning; break; case NotificationMessageType.Error: icon = ToolTipIcon.Error; break; } notifyIcon.ShowBalloonTip( timeout, message.Title, message.Message, icon); }
public void OnChannelClosed(object sender, StreamStoppedEventArgs args) { var channel = (Channel)sender; switch (args.StopReason) { case StopReason.OffAir: { var msg = new NotificationMessage( channel.ChannelInfo.Name, "チャンネルが終了しました", NotificationMessageType.Info); NotifyMessage(msg); } break; case StopReason.NoHost: case StopReason.ConnectionError: { var msg = new NotificationMessage( channel.ChannelInfo.Name, "チャンネルに接続できませんでした", NotificationMessageType.Error); NotifyMessage(msg); } break; } }
public void ShowNotificationMessage(NotificationMessage msg) { if (notifyIconManager==null) return; notifyIconManager.ShowNotificationMessage(msg); }
public void ShowNotificationMessage(NotificationMessage msg) { lock (notificationMessages) { notificationMessages.Add(msg); } }
public virtual void ShowNotificationMessage(NotificationMessage message) { MessageNotified?.Invoke(this, new NotificationMessageEventArgs(message)); }
public NotificationMessageEventArgs(NotificationMessage message) { Message = message; }