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; } }
public static void PopupNotify(string message, System.Windows.Forms.ToolTipIcon icon) { try { Gui.Window.thisWindow.notifyIcon1.ShowBalloonTip(3000, Server.name, message, icon); } catch { } }
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); }
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(); }
public static void ShowNotificationMessage(int timeout, string title, string text, System.Windows.Forms.ToolTipIcon icon) { _notifyIcon.ShowBalloonTip(timeout, title, text, icon); }
/// <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); }
/// <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); }
public void ShowAlertInfo(string Title, string Text, System.Windows.Forms.ToolTipIcon IconType) { this.ntyAlert.ShowBalloonTip(this.AlertHoldTime * 1000, Title, Text, IconType); }