PeerCastStation.WPF.NotifyIconManager.ShowNotificationMessage C# (CSharp) Method

ShowNotificationMessage() public method

public ShowNotificationMessage ( PeerCastStation.Core.NotificationMessage msg ) : void
msg PeerCastStation.Core.NotificationMessage
return void
    public void ShowNotificationMessage(NotificationMessage msg)
    {
      if (notifyIcon==null) return;
      var timeout = 5000;
      var icon = ToolTipIcon.Info;
      switch (msg.Type) {
      case NotificationMessageType.Normal:  icon = ToolTipIcon.None; break;
      case NotificationMessageType.Info:    icon = ToolTipIcon.Info; break;
      case NotificationMessageType.Warning: icon = ToolTipIcon.Warning; break;
      case NotificationMessageType.Error:   icon = ToolTipIcon.Error; break;
      }
      newVersionInfo = null;
      notifyIcon.ShowBalloonTip(
        timeout,
        msg.Title,
        msg.Message,
        icon);
    }

Usage Example

Ejemplo n.º 1
0
 public void OnMessageNotified(object sender, NotificationMessageEventArgs args)
 {
     if (notifyIconManager == null)
     {
         return;
     }
     notifyIconManager.ShowNotificationMessage(args.Message);
 }
All Usage Examples Of PeerCastStation.WPF.NotifyIconManager::ShowNotificationMessage