本文整理汇总了C#中Hardcodet.Wpf.TaskbarNotification.TaskbarIcon.ShowBalloonTip方法的典型用法代码示例。如果您正苦于以下问题:C# TaskbarIcon.ShowBalloonTip方法的具体用法?C# TaskbarIcon.ShowBalloonTip怎么用?C# TaskbarIcon.ShowBalloonTip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hardcodet.Wpf.TaskbarNotification.TaskbarIcon
的用法示例。
在下文中一共展示了TaskbarIcon.ShowBalloonTip方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainWindow
public MainWindow()
{
InitializeComponent();
// Get the taskbar icon object
Tb = this.ProcessNotifyIcon;
Tb.ToolTipText = Properties.Resources.ProgramName;
// Set window title
this.Title = Properties.Resources.ProgramName;
// Initial setting
CurrentStatus = ProcessStatus.Stopped;
UpdateIcon();
// Don't show window
SetWindowVisibility(false);
// Load the settings
LoadSettings();
// Start the checking process
StartCheckProcess();
if (ShowBalloonMessageOnStart)
{
Tb.ShowBalloonTip(Properties.Resources.ProgramName, "Started", BalloonIcon.Info);
}
}
示例2: AddTaskbarIcon
// Adds the notification icon
public void AddTaskbarIcon()
{
// The display text of the icon
string DisplayText = "MouseControl running at " + WebServer.runningIp;
systemIcon = new TaskbarIcon();
systemIcon.Icon = new System.Drawing.Icon(typeof(App), "MouseControlIcon.ico");
systemIcon.ToolTipText = DisplayText;
systemIcon.ShowBalloonTip("MouseControl", DisplayText, BalloonIcon.Info);
// Remove the text after a certain amount of time
Thread.Sleep(6000);
systemIcon.HideBalloonTip();
// Add context menu
ContextMenu cMenu = new ContextMenu();
MenuItem about = new MenuItem();
about.Header = "About";
about.Click += aboutClick;
MenuItem exit = new MenuItem();
exit.Header = "Exit";
exit.Click += exitClick;
cMenu.Items.Add(about);
cMenu.Items.Add(exit);
// Add System tray icon click handler
systemIcon.TrayMouseDoubleClick += SystemTrayIconClick;
systemIcon.ContextMenu = cMenu;
}
示例3: OnStartup
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
notifyIcon = (TaskbarIcon)FindResource("NotifyIcon");
notifyIcon.ShowBalloonTip("Beba Água", "Beba água iniciado!", BalloonIcon.Info);
}
示例4: OnStartup
protected override void OnStartup(System.Windows.StartupEventArgs e)
{
tb = (TaskbarIcon)FindResource("MyNotifyIcon");
var viewModel = new StahpViewModel();
viewModel.Notify += (s, evt) => tb.ShowBalloonTip("Stahp!!!", "Time's up.", BalloonIcon.Error);
tb.DataContext = viewModel;
}
示例5: OnStartup
/// <summary>
/// Create our hotkey on startup, initialize notifyicon
/// TBI -- Customize hotkey combination via options right click
/// </summary>
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
notifyIcon = (TaskbarIcon)FindResource("NotifyIcon");
var _hotKey = new KeyboardHook(Key.Space,KeyModifier.Ctrl, OnHotKeyHandler);
notifyIcon.ShowBalloonTip("Window Butler Started", "Press [CTRL] + [SPACE]", BalloonIcon.Info);
}
示例6: InitApplication
private void InitApplication()
{
//initialize NotifyIcon
tb = (TaskbarIcon)FindResource("MyNotifyIcon");
tb.ToolTipText = "MySynch Monitor";
tb.ShowBalloonTip("MySynch Monitor", "Starting the monitor", BalloonIcon.Info);
StartTheMonitor();
((MenuItem)tb.ContextMenu.Items[0]).Command=new RelayCommand(LaunchMapEditor);
((MenuItem)tb.ContextMenu.Items[1]).Command = new RelayCommand(LaunchMonitor);
((MenuItem)tb.ContextMenu.Items[2]).Command = new RelayCommand(CloseAll);
Application.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;
}
示例7: OnStartup
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
MainWindow = new MainWindow();
loadSettings();
_notifyIcon = (TaskbarIcon)FindResource("NotifyIcon");
_listener = new HttpListener();
string prefixes = String.Format(@"http://+:{0}/", _port);
_listener.Prefixes.Add(prefixes);
_listener.AuthenticationSchemes = AuthenticationSchemes.Anonymous;
try
{
_listener.Start();
_listenerTh = new Thread(startListener) {Name = @"HTTPListener Thread"};
_listenerTh.SetApartmentState(ApartmentState.STA);
_listenerTh.Start();
string text = String.Format("{0}:{1}", Utilities.localIpAddress(), _port);
if (_notifyIcon != null) _notifyIcon.ShowBalloonTip(@"Server Started", text, _notifyIcon.Icon);
}
catch
{
if (_notifyIcon != null) _notifyIcon.ShowBalloonTip(@"Error", "Failed to start server, could not bind port.", BalloonIcon.Error);
}
}
示例8: OnStartup
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
if (e.Args.Contains("/uninstall"))
{
new UninstallWindow().Show();
return;
}
Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;
Icon = new TaskbarIcon
{
IconSource =
new BitmapImage(new Uri(
@"pack://application:,,,/GamerJail;component/Resources/Icon.ico", UriKind.Absolute)),
ToolTipText = "GamerJail"
};
Icon.TrayLeftMouseDown += Tbi_TrayLeftMouseDown;
ServiceManager.Current.Load(Icon);
if (ServiceManager.Current.Config.ProtectionLevel == ProtectionLevel.Nothing)
{
Icon.ContextMenu = new ContextMenu();
var item = new MenuItem { Header = "Beenden" };
item.Click += (sender, args) => Current.Shutdown();
Icon.ContextMenu.Items.Add(item);
}
if (e.Args.Contains("/firstStart"))
Icon.ShowBalloonTip("GamerJail",
"GamerJail wurde gestartet und ist nun aktiv.", BalloonIcon.Info);
Current.Exit += Current_Exit;
Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
}
示例9: checkImap
public void checkImap(ImapClient imap,TaskbarIcon icon)
{
if (imap.Connect())
{
int getMailCnt;
if (type == MAIL_TYPE.GMAIL) getMailCnt = imap.GetMailList().Count();
else getMailCnt = yMailCntGet(imap.GetMailBox());
if (getMailCnt != mailCnt)
{
if (getMailCnt > mailCnt)
{
int newCnt = getMailCnt - mailCnt;
icon.ShowBalloonTip("メールの通知", "新着メール " + newCnt + "件", BalloonIcon.Info);
}
mailCnt = getMailCnt;
}
//string msg = "getMailCnt:" + getMailCnt + "件\nmailCnt:" + mailCnt;
//icon.ShowBalloonTip("メールの通知", msg, BalloonIcon.Info);
}
}
示例10: StreamPlayer_OnRecordingStopped
void StreamPlayer_OnRecordingStopped(object sender, EventArgs e)
{
this.MainWindowContext.Dispatcher.Invoke(new Action(delegate()
{
using(var taskbarIcon = new TaskbarIcon())
{
taskbarIcon.ShowBalloonTip(this.MainWindowContext.FindResource("AppName").ToString(), this.MainWindowContext.FindResource("RecordingStoppedDialog").ToString(), BalloonIcon.Info);
}
}));
}