public static void ShowBalloonTip(string notifyIconText = @"Device Tracker",
                                   System.Windows.Forms.ToolTipIcon toolTipIcon = System.Windows.Forms.ToolTipIcon.Info,
                                   string balloonTipTitle = @"Device Tracker", string balloonTipText = @"Device Tracker",
                                   int timeOut            = 1000)
 {
     try
     {
         if (_notifyIcon == null)
         {
             _notifyIcon = new System.Windows.Forms.NotifyIcon()
             {
                 Text = "Device Tracker",
             }
         }
         ;
         _notifyIcon.Text            = notifyIconText;
         _notifyIcon.BalloonTipIcon  = toolTipIcon;
         _notifyIcon.BalloonTipTitle = balloonTipTitle;
         _notifyIcon.BalloonTipText  = balloonTipText;
         _notifyIcon.ShowBalloonTip(timeOut);
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #2
0
 public static void PopupNotify(string message, System.Windows.Forms.ToolTipIcon icon)
 {
     try
     {
         Gui.Window.thisWindow.notifyIcon1.ShowBalloonTip(3000, Server.name, message, icon);
     }
     catch { }
 }
Пример #3
0
 public void ShowBalloon(string text, int second = 3, string title = "", WinForms.ToolTipIcon icon = WinForms.ToolTipIcon.Info)
 {
     if (title == "")
     {
         title = "Звонок";
     }
     text = text.Replace("<br>", "\r\n");
     _notifier.ShowBalloonTip(second * 1000, title, text, icon);
 }
Пример #4
0
        public void ShowNotification(string text, System.Drawing.Icon systemIcon, System.Windows.Forms.ToolTipIcon icon, int duration)
        {
            var notification = new System.Windows.Forms.NotifyIcon()
            {
                Visible        = true,
                Icon           = systemIcon,
                BalloonTipIcon = icon,
                BalloonTipText = text
            };

            // Display for 5 seconds.
            notification.ShowBalloonTip((int)(duration / 2));
            Thread.Sleep((int)(duration / 2));

            // The notification should be disposed when you don't need it anymore,
            // but doing so will immediately close the balloon if it's visible.
            notification.Dispose();
        }
Пример #5
0
 public static void ShowNotificationMessage(int timeout, string title, string text, System.Windows.Forms.ToolTipIcon icon)
 {
     _notifyIcon.ShowBalloonTip(timeout, title, text, icon);
 }
Пример #6
0
 /// <summary>
 /// 显示托盘通知
 /// </summary>
 /// <param name="msg"></param>
 /// <param name="tipType"></param>
 public void ShowNotify(string msg, Forms.ToolTipIcon tipType = Forms.ToolTipIcon.Info)
 {
     mainWindow.notifyIcon.ShowBalloonTip(500, APPLICATION_NAME, msg, tipType);
 }
Пример #7
0
 /// <summary>
 /// Displays a message from the tray icon.
 /// </summary>
 /// <param name="title">The title of the message to display.</param>
 /// <param name="message">The message contents to display.</param>
 /// <param name="icon">The icon to display with the message.</param>
 public void ShowMessage(string title, string message, System.Windows.Forms.ToolTipIcon icon = ToolTipIcon.None)
 {
     trayIcon.ShowBalloonTip(10000, title, message, icon);
 }
Пример #8
0
 public void ShowAlertInfo(string Title, string Text, System.Windows.Forms.ToolTipIcon IconType)
 {
     this.ntyAlert.ShowBalloonTip(this.AlertHoldTime * 1000, Title, Text, IconType);
 }