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


C# StatusBarIcon类代码示例

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


StatusBarIcon类属于命名空间,在下文中一共展示了StatusBarIcon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: HideAlert

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

示例7: Dispose

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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: 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


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