-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUI.cs
46 lines (43 loc) · 1.14 KB
/
GUI.cs
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
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DNP
{
class GUI
{
public static void msg (String message)
{
MessageBox.Show(message);
}
//effects class
public static class effects
{
public static void Opacity(float Perc, Form frm)
{
frm.Opacity = Perc;
}
public static void FadeIn(Form frm)
{
float FadeIn;
for (FadeIn = 0.0f; FadeIn <= 1.1; FadeIn += 0.1f)
{
frm.Opacity = FadeIn;
frm.Refresh();
System.Threading.Thread.Sleep(100);
}
}
public static void FadeOut(Form frm)
{
float FadeOut;
for (FadeOut = 90; FadeOut >= 10; FadeOut += -10)
{
frm.Opacity = FadeOut / 100;
frm.Refresh();
System.Threading.Thread.Sleep(100);
}
}
}
}
}