本文整理汇总了C#中ToolTipIcon类的典型用法代码示例。如果您正苦于以下问题:C# ToolTipIcon类的具体用法?C# ToolTipIcon怎么用?C# ToolTipIcon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolTipIcon类属于命名空间,在下文中一共展示了ToolTipIcon类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ShowBalloonTip
/// <summary>
/// Displays a balloon tip with the specified title, text, and icon in the taskbar for the specified time period.
/// </summary>
/// <param name="timeout">The time period, in milliseconds, the balloon tip should display.</param>
/// <param name="tipTitle">The title to display on the balloon tip.</param>
/// <param name="tipText">The text to display on the balloon tip.</param>
/// <param name="tipIcon">One of the <see cref="T:System.Windows.Forms.ToolTipIcon"/> values.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="timeout"/> is less than 0.</exception>
/// <exception cref="T:System.ArgumentException"><paramref name="tipText"/> is null or an empty string.</exception>
/// <exception cref="T:System.ComponentModel.InvalidEnumArgumentException">
/// <paramref name="tipIcon"/> is not a member of <see cref="T:System.Windows.Forms.ToolTipIcon"/>.
/// </exception>
internal static void ShowBalloonTip(int timeout, string tipTitle, string tipText, ToolTipIcon tipIcon)
{
if (Configuration.MadCow.TrayNotificationsEnabled)
{
Form1.GlobalAccess.MadCowTrayIcon.ShowBalloonTip(timeout, tipTitle, tipText, tipIcon);
}
}
开发者ID:OverlordCW,项目名称:MadCow,代码行数:19,代码来源:Tray.cs
示例2: NewNotify
public void NewNotify(int timeout, string title, string text, ToolTipIcon icon)
{
if (Icon != null)
{
Icon.ShowBalloonTip(timeout, title, text, icon);
}
}
开发者ID:KenanBek,项目名称:EventsManager,代码行数:7,代码来源:NotifyComponent.cs
示例3: ExibirAlerta
private void ExibirAlerta(string titulo, string mensagem, ToolTipIcon icone)
{
if (WindowState == FormWindowState.Minimized)
{
notifyIcon1.ShowBalloonTip(5000, titulo, mensagem, icone);
}
}
开发者ID:rcarubbi,项目名称:Carubbi.Chat,代码行数:7,代码来源:ChatForm.cs
示例4: ShowBallonTip
public ShowBallonTip(int timeout, string tipTitle, string tipText, ToolTipIcon toolTipIcon)
{
Timeout = timeout;
TipTitle = tipTitle;
TipText = tipText;
ToolTipIcon = toolTipIcon;
}
开发者ID:priestd09,项目名称:Papercut,代码行数:7,代码来源:ShowBallonTip.cs
示例5: ShowBaloon
public static void ShowBaloon(string msg, ToolTipIcon tip)
{
if (_notifyIcon != null)
{
_notifyIcon.ShowBalloonTip(5000, "Ошибка", string.IsNullOrEmpty(msg) ? "-": msg, tip);
}
}
开发者ID:ramonliu,项目名称:poker-miranda,代码行数:7,代码来源:Program.cs
示例6: ShowBalloonTip
public void ShowBalloonTip(int timeout,string tipTitle,string tipText,ToolTipIcon tipIcon) {
//
try {
if (this.ShowDesktopAlerts) this.mNotifyIcon.ShowBalloonTip(timeout,tipTitle,tipText,tipIcon);
}
catch (Exception ex) { if (this.TrayIconError != null) TrayIconError(this,new TrayIconErrorEventArgs(ex)); }
}
开发者ID:jpheary,项目名称:VS13.WinForms,代码行数:7,代码来源:TrayIcon.cs
示例7: Show
public static void Show(string title, string text, int milliseconds, ToolTipIcon icon)
{
if (n != null)
{
n.KillThread();
n.Close();
n.Dispose();
n = null;
}
n = new Notify();
n.carbonTheme1.Text = title;
n.label1.Text = text;
n.sleepTime = milliseconds;
switch (icon)
{
case ToolTipIcon.Info:
{
n.boxIcon.Image = new Bitmap(SystemIcons.Information.ToBitmap(), 26, 26);
}
break;
case ToolTipIcon.Error:
{
n.boxIcon.Image = new Bitmap(SystemIcons.Error.ToBitmap(), 26, 26);
}
break;
case ToolTipIcon.Warning:
{
n.boxIcon.Image = new Bitmap(SystemIcons.Exclamation.ToBitmap(), 26, 26);
}
break;
}
n.TopMost = true;
n.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - n.Width, Screen.PrimaryScreen.WorkingArea.Bottom - n.Height);
n.Show();
}
开发者ID:0x31337,项目名称:footlocker,代码行数:35,代码来源:Notify.cs
示例8: Balloon
public static void Balloon(string title, string text, ToolTipIcon tt_icon, int display_duration)
{
icon.BalloonTipTitle = title;
icon.BalloonTipText = text;
icon.BalloonTipIcon = tt_icon;
icon.ShowBalloonTip(display_duration);
}
开发者ID:ben-shepherd,项目名称:RealityCheckReminder,代码行数:7,代码来源:Taskbar.cs
示例9: Showtip
public static void Showtip(int time, string title, string content, ToolTipIcon icon, bool force = false)
{
if (Settings.Default.ShowPopup || force)
{
TaskbarIcon.ShowBalloonTip(time, title, content, icon);
}
}
开发者ID:NitroP,项目名称:OSUplayer,代码行数:7,代码来源:NotifySystem.cs
示例10: Draw
public static void Draw(IDeviceContext dc, Size minSize, Size maxSize, string title, string text, Rectangle titleRect, Rectangle rect, ToolTipIcon icon, Padding padding)
{
if (Application.RenderWithVisualStyles)
{
VisualStyleRenderer titleRenderer = new VisualStyleRenderer(VisualStyleElement.ToolTip.BalloonTitle.Normal);
VisualStyleRenderer balloonRenderer = new VisualStyleRenderer(VisualStyleElement.ToolTip.Balloon.Normal);
balloonRenderer.DrawBackground(dc, rect);
if (icon == ToolTipIcon.None)
{
titleRenderer.DrawText(dc, new Rectangle(padding.Left, padding.Top, rect.Width - (padding.Left + padding.Right), titleRect.Height),
title, false, TextFormatFlags.Left | TextFormatFlags.WordEllipsis | TextFormatFlags.VerticalCenter);
Rectangle balloonTextBounds = new Rectangle(padding.Left, padding.Top + titleRect.Height, rect.Width - (padding.Left + padding.Right), rect.Height - (padding.Top + titleRect.Height + padding.Bottom));
balloonRenderer.DrawText(dc, balloonTextBounds,
text, false, TextFormatFlags.Left | TextFormatFlags.WordBreak | TextFormatFlags.VerticalCenter);
}
else
{
throw new NotImplementedException();
}
}
else
{
throw new NotImplementedException();
}
}
开发者ID:fiftin,项目名称:WinFormsPopupAlerts,代码行数:28,代码来源:ToolTipBalloonDrawingHelper.cs
示例11: ShowBallon
public void ShowBallon(string message,ToolTipIcon toolTipIcon)
{
NotificationIcon.BalloonTipIcon = toolTipIcon;
NotificationIcon.BalloonTipText = message;
NotificationIcon.Visible = true;
NotificationIcon.ShowBalloonTip(10000);
}
开发者ID:Santhoshonet,项目名称:ProjeqzCurrencyConverter,代码行数:7,代码来源:CurrencyConverter.cs
示例12: ShowNotifyTip
public static void ShowNotifyTip(NotifyIcon notifyIcon, String NotifyTitle, String Message, ToolTipIcon TipIcon)
{
if (String.IsNullOrEmpty(Message))
{
Message = " ";
}
notifyIcon.ShowBalloonTip(300, NotifyTitle, Message, TipIcon);
}
开发者ID:raindyi,项目名称:BusinessReport,代码行数:8,代码来源:MessageHelper.cs
示例13: ShowBalloonTip
/// <summary>
/// 在任务栏显示水泡提示
/// </summary>
/// <param name="timeOut"></param>
/// <param name="tipTitle"></param>
/// <param name="tipText"></param>
/// <param name="tipIcon"></param>
public void ShowBalloonTip(
int timeOut,
string tipTitle,
string tipText,
ToolTipIcon tipIcon)
{
this.notifyIcon.ShowBalloonTip(timeOut, tipTitle, tipText, tipIcon);
}
开发者ID:michaelguan,项目名称:LightingDown,代码行数:15,代码来源:MainForm.cs
示例14: SetStatus
public void SetStatus(Status status, string message, string tip = null, ToolTipIcon tipIcon = ToolTipIcon.Info)
{
window.sshStatusTextBlock.Text = message;
icon.Icon = statusIcons[(int)status];
icon.Text = settings.ProxyType == "SSH" ? resources["XWall"] as string + " - " + message : resources["XWall"] as string;
if (tip != null)
icon.ShowBalloonTip(0, message, tip, tipIcon);
}
开发者ID:liuwentao,项目名称:x-wall,代码行数:10,代码来源:ConnectStatus.cs
示例15: ShowBalloonTip
public void ShowBalloonTip(string title, string tipText, int timeout, ToolTipIcon icon)
{
if (Notify != null)
{
Notify.ShowBalloonTip(timeout,
title,
tipText,
icon);
}
}
开发者ID:m19brandon,项目名称:zVirtualScenes,代码行数:10,代码来源:NotifyIcon.cs
示例16: ShowBalloonTip
private void ShowBalloonTip(
string message,
string title = "",
ToolTipIcon icon = ToolTipIcon.None)
{
notifyIcon.BalloonTipIcon = icon;
notifyIcon.BalloonTipText = message;
notifyIcon.BalloonTipTitle = title;
notifyIcon.ShowBalloonTip(1000);
}
开发者ID:jvanrhyn,项目名称:Ember,代码行数:10,代码来源:MainForm.cs
示例17: ShowBubbleInfo
public void ShowBubbleInfo(string message, ToolTipIcon iconType = ToolTipIcon.Info)
{
if (Settings.Instance.ShowBubbleTooltipWhenSyncing) {
this.icon.ShowBalloonTip(
500,
"Outlook Google Calendar Sync",
message,
iconType
);
}
}
开发者ID:dsuess,项目名称:OutlookGoogleSync,代码行数:11,代码来源:NotificationTray.cs
示例18: Draw
/// <summary>
/// Drawing content of alert window.
/// </summary>
/// <param name="dc">Graphics object of alert window.</param>
/// <param name="title">Title of alert.</param>
/// <param name="text">Text of alert.</param>
/// <param name="icon">Icon of alert.</param>
/// <param name="customImage">Custom image of alert.</param>
public virtual void Draw(System.Drawing.Graphics dc, string title, string text, ToolTipIcon icon = ToolTipIcon.None, System.Drawing.Image customImage = null)
{
Rectangle titleRect = GetTitleRect(dc, title, text, icon, customImage);
Rectangle bodyRect = GetBodyRect(dc, title, text, icon, customImage);
Rectangle rect = GetRect(dc, titleRect, bodyRect, icon, customImage);
Image img = GetIcon(icon, customImage);
Draw(dc, title, text, rect, titleRect, bodyRect, img, GetIconSize(icon, customImage).Width);
// drawing icon
if (img != null)
dc.DrawImage(img, new Point(Padding.Left + IconPadding.Left, rect.Height / 2 - (img.Height + IconPadding.Vertical) / 2));
}
开发者ID:fiftin,项目名称:WinFormsPopupAlerts,代码行数:19,代码来源:TooltipAlertRenderer.cs
示例19: BindToProjectMonitor
public void BindToProjectMonitor(IProjectMonitor monitor, bool showBalloonMessages, ToolTipIcon minimumNotificationLevel)
{
this.monitor = monitor;
monitor.Polled += Monitor_Polled;
this.minimumNotificationLevel = minimumNotificationLevel;
if (showBalloonMessages)
{
monitor.BuildOccurred += Monitor_BuildOccurred;
monitor.MessageReceived += Monitor_MessageReceived;
}
}
开发者ID:derrills1,项目名称:ccnet_gitmode,代码行数:12,代码来源:TrayIconFacade.cs
示例20: ShowBalloonTip
public void ShowBalloonTip(int timeOut, string tipTitle, string tipText, ToolTipIcon tipIcon, EventHandler balloonTipClickedHandler)
{
try
{
if (balloonTipClickedHandler != null)
{
NotifyIcon.BalloonTipClicked -= balloonTipClickedHandler;
NotifyIcon.BalloonTipClicked += balloonTipClickedHandler;
}
ShowBalloon(tipTitle, tipText, tipIcon);
}
catch (NullReferenceException)
{
}
}
开发者ID:tgmayfield,项目名称:svn-monitor,代码行数:15,代码来源:MainNotifier.cs
注:本文中的ToolTipIcon类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论