本文整理汇总了C#中StatusBarIcon.SetAlertMode方法的典型用法代码示例。如果您正苦于以下问题:C# StatusBarIcon.SetAlertMode方法的具体用法?C# StatusBarIcon.SetAlertMode怎么用?C# StatusBarIcon.SetAlertMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatusBarIcon
的用法示例。
在下文中一共展示了StatusBarIcon.SetAlertMode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: 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);
}
示例3: OnBusyStateChanged
static void OnBusyStateChanged (object s, BusyStateEventArgs args)
{
isBusy = args.IsBusy;
DispatchService.GuiDispatch (delegate {
busyDialog.UpdateBusyState (args);
if (args.IsBusy) {
if (busyStatusIcon == null) {
busyStatusIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (ImageService.GetPixbuf ("md-execute-debug", Gtk.IconSize.Menu));
busyStatusIcon.SetAlertMode (100);
busyStatusIcon.ToolTip = GettextCatalog.GetString ("The Debugger is waiting for an expression evaluation to finish.");
busyStatusIcon.EventBox.ButtonPressEvent += delegate {
busyDialog.Show ();
};
}
} else {
if (busyStatusIcon != null) {
busyStatusIcon.Dispose ();
busyStatusIcon = null;
}
}
});
}
示例4: 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;
}
示例5: 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 += new Gtk.ButtonPressEventHandler (OnShowLogPad);
errorIcon.SetAlertMode (5);
errorIcon.ToolTip = message.Message;
}