• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# StatusBarIcon类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中StatusBarIcon的典型用法代码示例。如果您正苦于以下问题:C# StatusBarIcon类的具体用法?C# StatusBarIcon怎么用?C# StatusBarIcon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StatusBarIcon类属于命名空间,在下文中一共展示了StatusBarIcon类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreatePopoverForIcon

		bool CreatePopoverForIcon (StatusBarIcon icon)
		{
			string tooltip = icon.ToolTip;
			if (tooltip == null)
				return false;

			CreatePopoverCommon (230, tooltip);
			return true;
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:9,代码来源:StatusBar.cs


示例2: GetImageForStatusBarIcon

 /// <summary>
 /// Return the image associated to the given StatusBarIcon.
 /// </summary>
 private Image GetImageForStatusBarIcon(StatusBarIcon i)
 {
     switch (i)
     {
         case StatusBarIcon.OK:
             return Properties.Resources.GreenCheck2;
         default:
             return Properties.Resources.Red_x_48x48;
     }
 }
开发者ID:tmbx,项目名称:kwm-release,代码行数:13,代码来源:frmMain.cs


示例3: PostStatus

        /// <summary>
        /// Set an icon and a message in the status bar.
        /// </summary>
        public void PostStatus(StatusBarIcon icon, String message)
        {
            if (m_stopFlag) return;

            Logging.Log("Stopping the Status timer.");
            m_timer.Stop();

            // Set the icon and the message directly in the status bar.
            m_mainForm.StatusBarImage = GetImageForStatusBarIcon(icon);
            m_mainForm.StatusBarText = message;
            Logging.Log("Starting the Status timer.");
            m_timer.Start();
        }
开发者ID:tmbx,项目名称:kwm-release,代码行数:16,代码来源:frmMain.cs


示例4: Cleanup

		static void Cleanup ()
		{
			DebuggerSession currentSession;
			StatusBarIcon currentIcon;
			IConsole currentConsole;

			lock (cleanup_lock) {
				if (!IsDebugging)
					return;

				currentIcon = busyStatusIcon;
				currentSession = session;
				currentConsole = console;

				currentBacktrace = null;
				busyStatusIcon = null;
				session = null;
				console = null;
			}

			if (oldLayout != null) {
				string layout = oldLayout;
				oldLayout = null;

				// Dispatch synchronously to avoid start/stop races
				DispatchService.GuiSyncDispatch (delegate {
					IdeApp.Workbench.HideCommandBar ("Debug");
					if (IdeApp.Workbench.CurrentLayout == "Debug")
						IdeApp.Workbench.CurrentLayout = layout;
				});
			}

			currentSession.BusyStateChanged -= OnBusyStateChanged;
			currentSession.TargetEvent -= OnTargetEvent;
			currentSession.TargetStarted -= OnStarted;

			currentSession.BreakpointTraceHandler = null;
			currentSession.GetExpressionEvaluator = null;
			currentSession.TypeResolverHandler = null;
			currentSession.OutputWriter = null;
			currentSession.LogWriter = null;
			
			if (currentConsole != null) {
				currentConsole.CancelRequested -= OnCancelRequested;
				currentConsole.Dispose ();
			}
			
			DispatchService.GuiDispatch (delegate {
				HideExceptionCaughtDialog ();

				if (currentIcon != null) {
					currentIcon.Dispose ();
					currentIcon = null;
				}

				if (StoppedEvent != null)
					StoppedEvent (null, new EventArgs ());

				NotifyCallStackChanged ();
				NotifyCurrentFrameChanged ();
				NotifyLocationChanged ();
			});

			currentSession.Dispose ();
		}
开发者ID:rpattabi,项目名称:monodevelop,代码行数:65,代码来源:DebuggingService.cs


示例5: Cleanup

		static void Cleanup ()
		{
			DebuggerSession currentSession;
			StatusBarIcon currentIcon;
			IConsole currentConsole;

			lock (cleanup_lock) {
				if (!IsDebugging)
					return;

				currentIcon = busyStatusIcon;
				currentSession = session;
				currentConsole = console;

				nextStatementLocations.Clear ();
				currentBacktrace = null;
				busyStatusIcon = null;
				session = null;
				console = null;
				pinnedWatches.InvalidateAll ();
			}

			if (oldLayout != null) {
				string layout = oldLayout;
				oldLayout = null;

				UnsetDebugLayout (layout);
			}

			currentSession.BusyStateChanged -= OnBusyStateChanged;
			currentSession.TargetEvent -= OnTargetEvent;
			currentSession.TargetStarted -= OnStarted;

			currentSession.BreakpointTraceHandler = null;
			currentSession.GetExpressionEvaluator = null;
			currentSession.TypeResolverHandler = null;
			currentSession.OutputWriter = null;
			currentSession.LogWriter = null;
			
			if (currentConsole != null) {
				currentConsole.CancelRequested -= OnCancelRequested;
				currentConsole.Dispose ();
			}
			
			DispatchService.GuiDispatch (delegate {
				HideExceptionCaughtDialog ();

				if (currentIcon != null) {
					currentIcon.Dispose ();
					currentIcon = null;
				}

				if (StoppedEvent != null)
					StoppedEvent (null, new EventArgs ());

				NotifyCallStackChanged ();
				NotifyCurrentFrameChanged ();
				NotifyLocationChanged ();
			});

			currentSession.Dispose ();
		}
开发者ID:newky2k,项目名称:monodevelop,代码行数:62,代码来源:DebuggingService.cs


示例6: SetStatusBar

 /// <summary>
 /// Set the application's status bar information. This is the prefered way
 /// to change these informations.
 /// </summary>
 public static void SetStatusBar(StatusBarIcon i, String text)
 {
     if (!IsUiStateOK()) return;
     UiBroker.SetStatusbar(i, text);
 }
开发者ID:tmbx,项目名称:kwm-release,代码行数:9,代码来源:Misc.cs


示例7: HideAlert

		public static void HideAlert ()
		{
			if (updateIcon != null) {
				updateIcon.Dispose ();
				updateIcon = null;
			}
		}
开发者ID:thild,项目名称:monodevelop,代码行数:7,代码来源:AddinUpdateHandler.cs


示例8: Dispose

		public override void Dispose()
		{
			base.Dispose ();
			Application.Invoke (delegate {
				if (icon != null) {
					icon.Dispose ();
					icon = null;
				}
			});
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:10,代码来源:BackgroundProgressMonitor.cs


示例9: BackgroundProgressMonitor

		public BackgroundProgressMonitor (string title, IconId iconName)
		{
			this.title = title;
			if (!iconName.IsNull) {
				Application.Invoke (delegate {
					Gdk.Pixbuf img = ImageService.GetPixbuf (iconName, IconSize.Menu);
					icon = IdeApp.Workbench.StatusBar.ShowStatusIcon (img);
					if (icon == null)
						LoggingService.LogError ("Icon '" + iconName + "' not found.");
				});
			}
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:12,代码来源:BackgroundProgressMonitor.cs


示例10: NotifyError

		static void NotifyError (LogMessage message)
		{
			if (!errorNotificationEnabled)
				return;
			ClearErrorIcon ();
			Gdk.Pixbuf pix = ImageService.GetPixbuf (Gtk.Stock.DialogError, Gtk.IconSize.Menu);
			errorIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (pix);
			errorIcon.EventBox.ButtonPressEvent += delegate {
				ClearErrorIcon ();
				MessageService.ShowError (message.Message);
			};
			errorIcon.SetAlertMode (5);
			errorIcon.ToolTip = message.Message;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:14,代码来源:InternalLog.cs


示例11: NotifyError

		static void NotifyError (LogMessage message)
		{
			if (!errorNotificationEnabled)
				return;
			ClearErrorIcon ();
			var pix = ImageService.GetIcon (Gtk.Stock.DialogError, Gtk.IconSize.Menu);
			errorIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (pix);
			errorIcon.Clicked += delegate {
				ClearErrorIcon ();
				MessageService.ShowError (message.Message);
			};
			errorIcon.SetAlertMode (5);
			errorIcon.ToolTip = message.Message;
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:14,代码来源:InternalLog.cs


示例12: WarnAvailableUpdates

		void WarnAvailableUpdates ()
		{
			if (!UpdateService.NotifyAddinUpdates)
				return;
			
			updateIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (ImageService.GetPixbuf ("md-software-update", IconSize.Menu));
			string s = GettextCatalog.GetString ("New add-in updates are available:");
			for (int n=0; n<updates.Length && n < 10; n++)
				s += "\n" + updates [n].Addin.Name;
			
			if (updates.Length > 10)
				s += "\n...";

			updateIcon.ToolTip = s;
			updateIcon.SetAlertMode (20);
			updateIcon.EventBox.ButtonPressEvent += new ButtonPressEventHandler (OnUpdateClicked);
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:17,代码来源:AddinsUpdateHandler.cs


示例13: WarnAvailableUpdates

		void WarnAvailableUpdates ()
		{
			if (!UpdateService.NotifyAddinUpdates)
				return;

			updateIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (ImageService.GetIcon ("md-updates", IconSize.Menu));
			string s = GettextCatalog.GetString ("New add-in updates are available:");
			for (int n=0; n<updates.Length && n < 10; n++)
				s += "\n" + updates [n].Addin.Name;

			if (updates.Length > 10)
				s += "\n...";

			updateIcon.ToolTip = s;
			updateIcon.SetAlertMode (20);
			updateIcon.Clicked += OnUpdateClicked;
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:17,代码来源:AddinsUpdateHandler.cs


示例14: UpdateInstrumentationIcon

		static void UpdateInstrumentationIcon ()
		{
			if (IdeApp.Preferences.EnableInstrumentation) {
				if (instrumentationStatusIcon == null) {
					instrumentationStatusIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (ImageService.GetPixbuf (Gtk.Stock.DialogInfo));
					instrumentationStatusIcon.ToolTip = "Instrumentation service enabled";
					instrumentationStatusIcon.EventBox.ButtonPressEvent += delegate {
						InstrumentationService.StartMonitor ();
					};
				}
			} else if (instrumentationStatusIcon != null) {
				instrumentationStatusIcon.Dispose ();
			}
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:14,代码来源:Ide.cs


示例15: Cleanup

		static void Cleanup ()
		{
			if (oldLayout != null) {
				string layout = oldLayout;
				oldLayout = null;
				// Dispatch asynchronously to avoid start/stop races
				DispatchService.GuiSyncDispatch (delegate {
					if (IdeApp.Workbench.CurrentLayout == "Debug")
						IdeApp.Workbench.CurrentLayout = layout;
				});
			}
			
			currentBacktrace = null;
			
			if (!IsDebugging)
				return;

			if (busyStatusIcon != null) {
				busyStatusIcon.Dispose ();
				busyStatusIcon = null;
			}
			
			session.TargetEvent -= OnTargetEvent;
			session.TargetStarted -= OnStarted;
			session.OutputWriter = null;
			session.LogWriter = null;
			session.BusyStateChanged -= OnBusyStateChanged;
			session.TypeResolverHandler = null;
			session.BreakpointTraceHandler = null;
			session.GetExpressionEvaluator = null;
			console.CancelRequested -= OnCancelRequested;
			
			// Dispose the session at the end, since it may take a while.
			DebuggerSession oldSession = session;
			session = null;
			
			DispatchService.GuiDispatch (delegate {
				if (StoppedEvent != null)
					StoppedEvent (null, new EventArgs ());
			});
			
			if (console != null) {
				console.Dispose ();
				console = null;
			}
			
			DispatchService.GuiDispatch (delegate {
				NotifyCallStackChanged ();
				NotifyCurrentFrameChanged ();
				NotifyLocationChanged ();
			});
			
			if (oldSession != null) {
				oldSession.BusyStateChanged -= OnBusyStateChanged;
				oldSession.Dispose ();
			}
		}
开发者ID:alistick,项目名称:monodevelop,代码行数:57,代码来源:DebuggingService.cs


示例16: UpdateInstrumentationIcon

		static void UpdateInstrumentationIcon ()
		{
			if (IdeApp.Preferences.EnableInstrumentation) {
				if (instrumentationStatusIcon == null) {
					instrumentationStatusIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (ImageService.GetIcon (MonoDevelop.Ide.Gui.Stock.Information));
					instrumentationStatusIcon.ToolTip = "Instrumentation service enabled";
					instrumentationStatusIcon.Clicked += delegate {
						InstrumentationService.StartMonitor ();
					};
				}
			} else if (instrumentationStatusIcon != null) {
				instrumentationStatusIcon.Dispose ();
			}
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:14,代码来源:Ide.cs


示例17: Cleanup

		static void Cleanup ()
		{
			currentBacktrace = null;
			
			if (!IsDebugging)
				return;

			if (busyStatusIcon != null) {
				busyStatusIcon.Dispose ();
				busyStatusIcon = null;
			}
			
			session.TargetEvent -= OnTargetEvent;
			session.TargetStarted -= OnStarted;
			session.OutputWriter = null;
			session.LogWriter = null;
			session.ExceptionHandler = null;
			session.BusyStateChanged -= OnBusyStateChanged;
			session.TypeResolverHandler = null;
			session.BreakpointTraceHandler = null;
			session.GetExpressionEvaluator = null;
			console.CancelRequested -= OnCancelRequested;
			
			// Dispose the session at the end, since it may take a while.
			DebuggerSession oldSession = session;
			session = null;

			if (StoppedEvent != null)
				StoppedEvent (null, new EventArgs ());
			
			if (console != null) {
				console.Dispose ();
				console = null;
			}
			
			DispatchService.GuiDispatch (delegate {
				NotifyCallStackChanged ();
				NotifyCurrentFrameChanged ();
				NotifyLocationChanged ();
			});
			
			if (oldSession != null) {
				oldSession.BusyStateChanged -= OnBusyStateChanged;
				oldSession.Dispose ();
			}
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:46,代码来源:DebuggingService.cs


示例18: HideStatusIcon

		internal void HideStatusIcon ()
		{
			Gtk.Application.Invoke (delegate {
				workspacesLoading--;
				if (workspacesLoading == 0 && statusIcon != null) {
					statusIcon.Dispose ();
					statusIcon = null;
					OnLoadingFinished (EventArgs.Empty);
					WorkspaceLoaded?.Invoke (this, EventArgs.Empty);
				}
			});
		}
开发者ID:mono,项目名称:monodevelop,代码行数:12,代码来源:MonoDevelopWorkspace.cs


示例19: ShowStatusIcon

		internal void ShowStatusIcon ()
		{
			Gtk.Application.Invoke (delegate {
				workspacesLoading++;
				if (statusIcon != null)
					return;
				statusIcon = IdeApp.Workbench?.StatusBar.ShowStatusIcon (ImageService.GetIcon ("md-parser"));
				if (statusIcon != null)
					statusIcon.ToolTip = GettextCatalog.GetString ("Gathering class information");
			});
		}
开发者ID:mono,项目名称:monodevelop,代码行数:11,代码来源:MonoDevelopWorkspace.cs


示例20: ClearErrorIcon

		public static void ClearErrorIcon ()
		{
			if (errorIcon != null) {
				errorIcon.Dispose ();
				errorIcon = null;
			}
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:7,代码来源:InternalLog.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# StatusChangedEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# Status类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap