-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.cs
More file actions
36 lines (31 loc) · 1.19 KB
/
utils.cs
File metadata and controls
36 lines (31 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TireProject
{
class utils
{
public static void showNotifyMessage(String strMessage, String strTitle, System.Windows.Forms.ToolTipIcon notificationIcon)
{
var notification = new System.Windows.Forms.NotifyIcon
{
Visible = true,
Icon = System.Drawing.SystemIcons.Information,
BalloonTipIcon = notificationIcon,
BalloonTipTitle = strTitle,
BalloonTipText = strMessage,
};
// Display for 5 seconds.
notification.ShowBalloonTip(1000);
// This will let the balloon close after it's 5 second timeout
// for demonstration purposes. Comment this out to see what happens
// when dispose is called while a balloon is still visible.
System.Threading.Thread.Sleep(2000);
// The notification should be disposed when you don't need it anymore,
// but doing so will immediately close the balloon if it's visible.
notification.Dispose();
}
}
}