public void ShowBalloonTip(string title, string mesasge, BalloonIcon icon) { _icon.ShowBalloonTip( title, mesasge, ConvertEnum <BalloonIcon, Hardcodet.Wpf.TaskbarNotification.BalloonIcon>(icon)); }
private void ShowStandardBalloon(string title, string text, string iconColour) { ChangeIcon(iconColour); //show balloon with custom icon BalloonIcon icon = BalloonIcon.Error; switch (iconColour) { case "red": icon = BalloonIcon.Error; break; case "green": icon = BalloonIcon.Info; break; case "yellow": case "grey": icon = BalloonIcon.Warning; break; } MyNotifyIcon.ShowBalloonTip(title, text, icon); MyNotifyIcon.ToolTipText = title; //hide balloon //MyNotifyIcon.HideBalloonTip(); }
/// <summary> /// Displays a balloon tip with the specified title, /// text, and icon in the taskbar for the specified time period. /// </summary> /// <param name="title">The title to display on the balloon tip.</param> /// <param name="message">The text to display on the balloon tip.</param> /// <param name="symbol">A symbol that indicates the severity.</param> public void ShowBalloonTip(string title, string message, BalloonIcon symbol) { lock (lockObject) { ShowBalloonTip(title, message, (BalloonFlags)symbol, IntPtr.Zero); } }
public void ShowNotification(string title, string content, BalloonIcon icon) { taskbarIcon.ShowBalloonTip( title, content, icon); }
/// <summary> /// Displays a balloon tip with the specified title, /// text, and icon in the taskbar for the specified time period. /// </summary> /// <param name="title">The title to display on the balloon tip.</param> /// <param name="message">The text to display on the balloon tip.</param> /// <param name="symbol">A symbol that indicates the severity.</param> public void ShowBalloonTip(string title, string message, BalloonIcon symbol) { lock (this.SyncLock) { ShowBalloonTip(title, message, symbol.GetBalloonFlag(), IntPtr.Zero); } }
private void OnNotifyStatus(string message, BalloonIcon icon) { if (NotifyStatus != null) { NotifyStatus(this, new NotifyStatusEventArgs(message, icon)); } }
private void Notify(string title, string text, BalloonIcon balloonIcon) { if (balloonIcon != BalloonIcon.Info || Properties.Settings.Default.IsNotifyWhenSuccess) { notifyIcon.ShowBalloonTip(title, text, balloonIcon); } }
public void ShowBalloonTip(string title, string message, BalloonIcon icon) { ShowBalloonTipTriggered.Invoke(this, new ShowBalloonTipEventArgs { Title = title, Message = message, Icon = icon }); }
public void ShowBalloonTip(string title, string message, BalloonIcon balloon) { //Icon.ShowBalloonTip(title, message, balloon); if (TaskbarTrayIcon != null) { TaskbarTrayIcon.ShowBalloonTip(title, message, balloon); } }
public void ShowCustomBalloon(string title, string message, BalloonIcon symbol = BalloonIcon.Info, PopupAnimation animation = PopupAnimation.Fade, int?timeout = 3000) { var baloon = new Balloon() { Title = title, Description = message, Icon = symbol }; _taskbarIcon.ShowCustomBalloon(baloon, animation, timeout); }
public void Handle(ScriptErrorEvent message) { BalloonIcon ico = message.Level == ErrorLevel.Warning ? BalloonIcon.Warning : BalloonIcon.Error; if (TaskbarTrayIcon != null && shellViewModel.WindowState == WindowState.Minimized) { TaskbarTrayIcon.ShowBalloonTip("Script Error", message.Description, ico); } }
// Show a balloon tooltip with the passed-in message, title, and icon public void ShowBalloon(string message, string title, BalloonIcon balloonIcon) { iconData.uFlags = NIF_INFO; iconData.szInfo = message; iconData.szInfoTitle = title; iconData.dwInfoFlags = (int)balloonIcon; Shell_NotifyIcon(NIM_MODIFY, ref iconData); }
private void SetStatus(string message, BalloonIcon icon) { bool displayNotifications = false; bool.TryParse(System.Configuration.ConfigurationManager.AppSettings["DisplayNotifications"], out displayNotifications); if (displayNotifications) { taskbarIcon.ShowBalloonTip("SPSync", message, icon); } }
public virtual void Notify(string title, string message, BalloonIcon symbol = BalloonIcon.None, string soundSource = null, bool loop = false, Action <ISymbolBalloonNotify> callback = null) => Request.Raise(new SymbolBallonNotification { Title = title, Content = message, Symbol = symbol, SoundSource = soundSource, Loop = loop }, callback);
/// <summary> /// Display a notification to the user, while flashing the window in the taskbar if it is not focused. /// </summary> /// <param name="title">The title for the notification.</param> /// <param name="message">The message body for the notification.</param> /// <param name="icon">The icon for the notification.</param> private void DisplayNotification(string title, string message, BalloonIcon icon) { //Use a background thread to show a notification. Task.Run(() => TaskbarIcon.ShowBalloonTip(title, message, icon)); //If the window is minimised, make sure it is visible in the taskbar. if (WindowState == WindowState.Minimized) { ShowInTaskbar = true; } //Flash this window until it receives focus. FlashWindow.Flash(this); }
/// <summary> /// Shows the balloon tool tip. /// </summary> /// <param name="title">The title.</param> /// <param name="message">The message.</param> /// <param name="balloonIcon">The balloon icon.</param> public void ShowBalloonToolTip(string title, string message, BalloonIcon balloonIcon = BalloonIcon.None) { var enumName = Enum.GetName(typeof(BalloonIcon), balloonIcon); Hardcodet.Wpf.TaskbarNotification.BalloonIcon taskBarBalloonIcon; if (!Enum.TryParse(enumName, true, out taskBarBalloonIcon)) { throw new ApplicationException("Invalid balloon icon symbol."); } this.MainWindow.ShowBalloonMessage(new BalloonMessage { Title = title, Message = message, Icon = taskBarBalloonIcon }); }
public void showBalloonTip_Handler(string t, string m) { string title = t; string message = m; if (rbCustomIcon.IsChecked == true) { //just display the icon on the tray var icon = tb.Icon; tb.ShowBalloonTip(title, message, icon); } else { BalloonIcon bi = rbInfo.IsChecked == true ? BalloonIcon.Info : BalloonIcon.Error; tb.ShowBalloonTip(title, message, bi); } }
public void ShowBalloon(string title, string message, BalloonIcon icon, SystemSound sound) { //trayIcon.Visibility = Visibility.Visible; trayIcon.ShowBalloonTip(title, message, icon); if (sound != null) { sound.Play(); } //Task restoreTray = new Task(new Action(() => //{ // Thread.Sleep(7000); // Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => trayIcon.VisibilitytrayIcon.Visibility = WindowState == WindowState.Minimized ? Visibility.Visible : Visibility.Hidden)); //})); //restoreTray.Start(); }
/// <summary> /// Displays a balloon tip. /// </summary> private void showBalloonTip_Click(object sender, RoutedEventArgs e) { string title = txtBalloonTitle.Text; string message = txtBalloonText.Text; if (rbCustomIcon.IsChecked == true) { //just display the icon on the tray var icon = tb.Icon; tb.ShowBalloonTip(title, message, icon); } else { BalloonIcon bi = rbInfo.IsChecked == true ? BalloonIcon.Info : BalloonIcon.Error; tb.ShowBalloonTip(title, message, bi); } }
public static BalloonFlags smethod_3(this BalloonIcon balloonIcon_0) { switch (balloonIcon_0) { case BalloonIcon.None: return(BalloonFlags.None); case BalloonIcon.Info: return(BalloonFlags.Info); case BalloonIcon.Warning: return(BalloonFlags.Warning); case BalloonIcon.Error: return(BalloonFlags.Error); } throw new ArgumentOutOfRangeException("icon"); }
public void ShowBalloonTip(string title, string message, BalloonIcon symbol, TimeSpan timeout) { lock (lockObject) { notifyIcon.ShowBalloonTip(title, message, symbol); cancelationToken.Cancel(); var newToken = new CancellationTokenSource(); Task.Run(async() => { await Task.Delay(timeout); if (newToken.IsCancellationRequested) { return; } notifyIcon.HideBalloonTip(); }, newToken.Token); cancelationToken = newToken; } }
/// <summary> /// Gets a <see cref="BalloonFlags"/> enum value that /// matches a given <see cref="BalloonIcon"/>. /// </summary> public static BalloonFlags GetBalloonFlag(this BalloonIcon icon) { switch (icon) { case BalloonIcon.None: return(BalloonFlags.None); case BalloonIcon.Info: return(BalloonFlags.Info); case BalloonIcon.Warning: return(BalloonFlags.Warning); case BalloonIcon.Error: return(BalloonFlags.Error); default: throw new ArgumentOutOfRangeException("icon"); } }
private void ShowBalloon(string title, string message, string iconName) { BalloonIcon icon = BalloonIcon.None; switch (iconName) { case "Error": icon = BalloonIcon.Error; break; case "Warning": icon = BalloonIcon.Warning; break; case "Info": icon = BalloonIcon.Info; break; } if (_notifyIcon != null) { _notifyIcon.ShowBalloonTip(title ?? "SMARTdoc Share", message, icon); } }
private void DispalyBalloon(string title, string message, BalloonIcon icon) { var tb = Application.Current.TryFindResource("NotifyIcon") as TaskbarIcon; tb?.ShowBalloonTip(title, message, icon); }
/// <summary> /// 標準の通知バルーンを表示します。 /// </summary> /// <param name="title">タイトル</param> /// <param name="message">メッセージ</param> /// <param name="symbol">表示アイコン</param> private void Notify(string title, string message, BalloonIcon symbol) { _taskbarIcon.ShowBalloonTip(title, message, symbol); }
public NotificationMessage(string title, string text, BalloonIcon icon) { Title = title; Text = text; Icon = icon; }
public void PopTaskBarMessage(string message, BalloonIcon category = BalloonIcon.Info) { taskbarIcon.ShowBalloonTip("3DBean", message, category); }
/// <summary> /// Shows a balloon tip. /// </summary> /// <param name="notificationType">Notification type.</param> /// <param name="title">Title to show in the balloon tip.</param> /// <param name="message">Message to show in the balloon tip.</param> /// <param name="icon">Icon to show in the balloon tip.</param> private void ShowNotification(TrayNotificationEnum notificationType, string title, string message, BalloonIcon icon) { _lastNotification = notificationType; Tray.ShowBalloonTip(title, message, icon); }
public void ShowTaskBarPopup(string title, string message, BalloonIcon symbol) { TaskBarIcon.ShowBalloonTip(title, message, symbol); }
public virtual void NotifyOnUiThread(string title, string message, BalloonIcon symbol = BalloonIcon.None, string soundSource = null, bool loop = false, Action <ISymbolBalloonNotify> callback = null) => RunOnUiThread(() => Notify(title, message, symbol, soundSource, loop, callback));
public static void ShowBalloon(string text, BalloonIcon icon) { App.TrayIcon.ShowBalloonTip(Resources.AppName, text, icon); }
private void ShowBalloonTip(string title, string text, object context = null, BalloonIcon icon = BalloonIcon.None) { balloonTipContext = context; taskbarIcon.ShowBalloonTip(title, text, icon); }
public void ShowBalloon(string title, string message, BalloonIcon icon = BalloonIcon.Info) { TaskBar.ShowBalloonTip(title, message, icon); }
private void Show(string title, string message, BalloonIcon icon) { _taskbarIcon.ShowBalloonTip(title, message, icon); }
public void ShowBalloonTip(string title, string message, BalloonIcon symbol) { _taskbarIcon.ShowBalloonTip(title, message, symbol); }
/// <summary> /// Displays a balloon tip with the specified title, /// text, and icon in the taskbar for the specified time period. /// </summary> /// <param name="title">The title to display on the balloon tip.</param> /// <param name="message">The text to display on the balloon tip.</param> /// <param name="symbol">A symbol that indicates the severity.</param> public void ShowBalloonTip(string title, string message, BalloonIcon symbol) { lock (this) { ShowBalloonTip(title, message, symbol.GetBalloonFlag(), IntPtr.Zero); } }