本文整理汇总了C#中ToolTipIcon类的典型用法代码示例。如果您正苦于以下问题:C# ToolTipIcon类的具体用法?C# ToolTipIcon怎么用?C# ToolTipIcon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolTipIcon类属于命名空间,在下文中一共展示了ToolTipIcon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例2: NewNotify
public void NewNotify(int timeout, string title, string text, ToolTipIcon icon)
{
if (Icon != null)
{
Icon.ShowBalloonTip(timeout, title, text, icon);
}
}
示例3: ExibirAlerta
private void ExibirAlerta(string titulo, string mensagem, ToolTipIcon icone)
{
if (WindowState == FormWindowState.Minimized)
{
notifyIcon1.ShowBalloonTip(5000, titulo, mensagem, icone);
}
}
示例4: ShowBallonTip
public ShowBallonTip(int timeout, string tipTitle, string tipText, ToolTipIcon toolTipIcon)
{
Timeout = timeout;
TipTitle = tipTitle;
TipText = tipText;
ToolTipIcon = toolTipIcon;
}
示例5: ShowBaloon
public static void ShowBaloon(string msg, ToolTipIcon tip)
{
if (_notifyIcon != null)
{
_notifyIcon.ShowBalloonTip(5000, "Ошибка", string.IsNullOrEmpty(msg) ? "-": msg, tip);
}
}
示例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)); }
}
示例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();
}
示例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);
}
示例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);
}
}
示例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();
}
}
示例11: ShowBallon
public void ShowBallon(string message,ToolTipIcon toolTipIcon)
{
NotificationIcon.BalloonTipIcon = toolTipIcon;
NotificationIcon.BalloonTipText = message;
NotificationIcon.Visible = true;
NotificationIcon.ShowBalloonTip(10000);
}
示例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);
}
示例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);
}
示例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);
}
示例15: ShowBalloonTip
public void ShowBalloonTip(string title, string tipText, int timeout, ToolTipIcon icon)
{
if (Notify != null)
{
Notify.ShowBalloonTip(timeout,
title,
tipText,
icon);
}
}