public void ShowBalloonTip(string title, string mesasge, BalloonIcon icon) { _icon.ShowBalloonTip( title, mesasge, ConvertEnum <BalloonIcon, Hardcodet.Wpf.TaskbarNotification.BalloonIcon>(icon)); }
public App() { try { System.Reflection.Assembly thisExe = System.Reflection.Assembly.GetExecutingAssembly(); System.Windows.Controls.MenuItem btnQuit = new System.Windows.Controls.MenuItem(); btnQuit.Name = "btnQuit"; btnQuit.Header = "Quit"; btnQuit.IsCheckable = false; btnQuit.Click += btnQuit_Click; System.Windows.Controls.ContextMenu cntxRemoteExecuteServer = new System.Windows.Controls.ContextMenu(); cntxRemoteExecuteServer.Items.Add(btnQuit); cntxRemoteExecuteServer.Name = "cntxIDBrowserServiceStandalone"; using (System.IO.Stream file = thisExe.GetManifestResourceStream("IDBrowserServiceStandalone.Images.Antenna.ico")) { ApplicationIcon = new System.Drawing.Icon(file); } taskbarIcon = new Hardcodet.Wpf.TaskbarNotification.TaskbarIcon(); taskbarIcon.Icon = ApplicationIcon; taskbarIcon.ContextMenu = cntxRemoteExecuteServer; hostIDBrowserService = new System.ServiceModel.ServiceHost(typeof(IDBrowserServiceCode.Service)); hostIDBrowserService.Open(); taskbarIcon.ShowBalloonTip("Server started", System.String.Format("IDBrowserService started on: {0}", hostIDBrowserService.BaseAddresses[0]), Hardcodet.Wpf.TaskbarNotification.BalloonIcon.Info); } catch (Exception e) { if (taskbarIcon != null) { taskbarIcon.ShowBalloonTip("Error", e.ToString(), Hardcodet.Wpf.TaskbarNotification.BalloonIcon.Error); } ; } }
public void TabMessageNotificationHandler(string tabName, string message) { tb.ShowBalloonTip(tabName, message, Hardcodet.Wpf.TaskbarNotification.BalloonIcon.Info); }