forked from AgricheX/ModMaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSplashScreen.cs
106 lines (96 loc) · 3.12 KB
/
SplashScreen.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mod_Maker
{
public partial class SplashScreen : Form
{
#region InitializeComponent
public SplashScreen()
{
InitializeComponent();
}
private static Random random = new Random();
private void SplashScreen_Load(object sender, EventArgs e)
{
this.Opacity = 0;
int random2 = random.Next(phrases.Count);
label2.Text = phrases[random2];
}
#endregion
#region phrases
List<string> phrases = new List<string>
{
"Stay hydrated, drink water!",
"Create massive slime invasions in your world!",
"ModMaker was made by aliens who play WorldBox.",
"Now with a few clicks, you can turn your imagination\n" + "into reality!",
"Transform your WorldBox into a Magical World!",
"Want to see tanks at WorldBox? Now it's possible!",
"Transform your WorldBox into a Futuristic World!",
"You can now create lightsabers in WorldBox!",
"Get weapons from your favorite games on WorldBox with\n" + "ModMaker!",
"Subscribe to my YouTube channel. @AgricheX",
"Create as many mods as you can!",
"Found any bugs? Report me on discord!\n" + "My @: @agrichex",
"Support me by subscribing to my Patreon to encourage me to\n" + "bring updates to ModMaker! patreon.com/Agriche",
"Support me by subscribing to my Patreon!"
};
#endregion
#region timers
private void timerProgressBar_Tick(object sender, EventArgs e)
{
progressBar1.Increment(2);
if (progressBar1.Value == 100)
{
timerProgressBar.Stop();
timerFadeOUT.Start();
}
if (progressBar1.Value == 50)
{
int random2 = random.Next(phrases.Count);
label2.Text = phrases[random2];
}
if (progressBar1.Value == 90)
{
int random2 = random.Next(phrases.Count);
label2.Text = phrases[random2];
}
else
{
}
}
private void timerFadeIN_Tick(object sender, EventArgs e)
{
if (this.Opacity == 1)
{
timerFadeIN.Stop();
}
else
{
this.Opacity = this.Opacity + 0.02;
}
}
private void timerFadeOUT_Tick(object sender, EventArgs e)
{
if (this.Opacity == 0)
{
timerFadeOUT.Stop();
this.Dispose();
ModMakerMain modmakermain = new ModMakerMain();
modmakermain.Show();
}
else
{
this.Opacity = this.Opacity - 0.04;
}
}
#endregion
}
}