当前位置: 首页>>代码示例>>C#>>正文


C# TaskbarIcon.ShowBalloonTip方法代码示例

本文整理汇总了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);
            }
        }
开发者ID:cleanthis26,项目名称:TrayApplicationManager,代码行数:29,代码来源:MainWindow.xaml.cs

示例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;
        }
开发者ID:jamest222,项目名称:MouseControl,代码行数:33,代码来源:MainWindow.xaml.cs

示例3: OnStartup

        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            notifyIcon = (TaskbarIcon)FindResource("NotifyIcon");

            notifyIcon.ShowBalloonTip("Beba Água", "Beba água iniciado!", BalloonIcon.Info);
        }
开发者ID:joaopgrassi,项目名称:Desktop-Water-Reminder,代码行数:8,代码来源:App.xaml.cs

示例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;
        }
开发者ID:PapaMufflon,项目名称:Stahp,代码行数:9,代码来源:App.xaml.cs

示例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);
        }
开发者ID:SamTwining,项目名称:WindowButler,代码行数:13,代码来源:App.xaml.cs

示例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;
 }
开发者ID:oduma,项目名称:MySynch,代码行数:12,代码来源:App.xaml.cs

示例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);
     }
 }
开发者ID:kurdtkobain,项目名称:DestifySharp,代码行数:24,代码来源:App.xaml.cs

示例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;
        }
开发者ID:Alkalinee,项目名称:GamerJail,代码行数:39,代码来源:App.xaml.cs

示例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);
            }
            
        }
开发者ID:wasuken,项目名称:MailGet,代码行数:23,代码来源:MailChecker.cs

示例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);
         }
     }));
 }
开发者ID:Yothri,项目名称:RadioDesk,代码行数:10,代码来源:MainViewModel.cs


注:本文中的Hardcodet.Wpf.TaskbarNotification.TaskbarIcon.ShowBalloonTip方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。