-
Notifications
You must be signed in to change notification settings - Fork 3
/
fProject.vb
165 lines (130 loc) · 7 KB
/
fProject.vb
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
Public Class fProject
Private Sub fProject_Leave(sender As Object, e As EventArgs) Handles Me.Leave
If My.Settings.SettingsSound = True then My.Computer.Audio.Play(My.Resources.closewindow, AudioPlayMode.Background)
End Sub
Private Sub fProject_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If My.Settings.SettingsSound = True then My.Computer.Audio.Play(My.Resources.openwindow, AudioPlayMode.Background)
End Sub
Private Sub TrackBar7_Scroll(sender As Object, e As EventArgs)
End Sub
Private Sub TrackBar7_Scroll(sender As Object) Handles TrackBar7.Scroll
Testing.Text = TrackBar7.Value
DefinedWeeks.Text = Val(Production.Text) + Val(Design.Text) + Val(Programming.Text) + Val(LevelCreation.Text) + Val(ArtProduction.Text) + Val(Testing.Text)
End Sub
Private Sub TrackBar6_Scroll(sender As Object) Handles TrackBar6.Scroll
ArtProduction.Text = TrackBar6.Value
DefinedWeeks.Text = Val(Production.Text) + Val(Design.Text) + Val(Programming.Text) + Val(LevelCreation.Text) + Val(ArtProduction.Text) + Val(Testing.Text)
End Sub
Private Sub TrackBar5_Scroll(sender As Object) Handles TrackBar5.Scroll
LevelCreation.Text = TrackBar5.Value
DefinedWeeks.Text = Val(Production.Text) + Val(Design.Text) + Val(Programming.Text) + Val(LevelCreation.Text) + Val(ArtProduction.Text) + Val(Testing.Text)
End Sub
Private Sub TrackBar4_Scroll(sender As Object) Handles TrackBar4.Scroll
Programming.Text = TrackBar4.Value
DefinedWeeks.Text = Val(Production.Text) + Val(Design.Text) + Val(Programming.Text) + Val(LevelCreation.Text) + Val(ArtProduction.Text) + Val(Testing.Text)
End Sub
Private Sub TrackBar3_Scroll(sender As Object) Handles TrackBar3.Scroll
Design.Text = TrackBar3.Value
DefinedWeeks.Text = Val(Production.Text) + Val(Design.Text) + Val(Programming.Text) + Val(LevelCreation.Text) + Val(ArtProduction.Text) + Val(Testing.Text)
End Sub
Private Sub TrackBar2_Scroll(sender As Object) Handles TrackBar2.Scroll
Production.Text = TrackBar2.Value
DefinedWeeks.Text = Val(Production.Text) + Val(Design.Text) + Val(Programming.Text) + Val(LevelCreation.Text) + Val(ArtProduction.Text) + Val(Testing.Text)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim TotalPer As Integer
Testing.Text = 5
TrackBar7.Value = 5
TotalPer = TextBox1.Text
Production.Text = Math.Round(TextBox1.Text * (10 / 100))
TrackBar2.Maximum = TextBox1.Text
TrackBar2.Value = Production.Text
Design.Text = Math.Round(TextBox1.Text * (15 / 100))
TrackBar3.Maximum = TextBox1.Text
TrackBar3.Value = Design.Text
Programming.Text = Math.Round(TextBox1.Text * (25 / 100))
TrackBar4.Maximum = TextBox1.Text
TrackBar4.Value = Programming.Text
LevelCreation.Text = Math.Round(TextBox1.Text * (25 / 100))
TrackBar5.Maximum = TextBox1.Text
TrackBar5.Value = LevelCreation.Text
ArtProduction.Text = Math.Round(TextBox1.Text * (15 / 100))
TrackBar6.Maximum = TextBox1.Text
TrackBar6.Value = ArtProduction.Text
DefinedWeeks.Text = Val(Production.Text) + Val(Design.Text) + Val(Programming.Text) + Val(LevelCreation.Text) + Val(ArtProduction.Text) + Val(Testing.Text)
Do Until DefinedWeeks.Text = TextBox1.Text
TotalPer = GetRandom(1, 5) 'randomly select which one drops
Select Case TotalPer
Case Is = 1
If DefinedWeeks.Text < TextBox1.Text Then
Production.Text = Production.Text + 1
Else
Production.Text = Production.Text - 1
End If
TrackBar2.Value = Production.Text
Case Is = 2
If DefinedWeeks.Text < TextBox1.Text Then
Design.Text = Design.Text + 1
Else
Design.Text = Design.Text - 1
End If
TrackBar3.Value = Design.Text
Case Is = 3
If DefinedWeeks.Text < TextBox1.Text Then
Programming.Text = Programming.Text + 1
Else
Programming.Text = Programming.Text - 1
End If
TrackBar4.Value = Programming.Text
Case Is = 4
If DefinedWeeks.Text < TextBox1.Text Then
LevelCreation.Text = LevelCreation.Text + 1
Else
LevelCreation.Text = LevelCreation.Text - 1
End If
TrackBar5.Value = LevelCreation.Text
Case Is = 5
If DefinedWeeks.Text < TextBox1.Text Then
ArtProduction.Text = ArtProduction.Text + 1
Else
ArtProduction.Text = ArtProduction.Text - 1
End If
TrackBar6.Value = ArtProduction.Text
End Select
DefinedWeeks.Text = Val(Production.Text) + Val(Design.Text) + Val(Programming.Text) + Val(LevelCreation.Text) + Val(ArtProduction.Text) + Val(Testing.Text)
Loop
Call MsgBox("Below is the recommended schedule. Adjust as you deem necessary.", vbInformation)
End Sub
Private Sub HScrollBar1_Scroll(sender As Object) Handles HScrollBar1.Scroll
TextBox1.Text = HScrollBar1.Value
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
If My.Settings.SettingsSound = True then My.Computer.Audio.Play(My.Resources.menuselect, AudioPlayMode.Background)
If TextBox1.Text <> DefinedWeeks.Text Then
Call MsgBox("The defined weeks must equal the timelin.", vbCritical)
Exit Sub
End If
With FMain
.DevelopStages.Items.Clear()
.DevelopStages.Items.Add(Production.Text)
.DevelopStages.Items.Add(Design.Text)
.DevelopStages.Items.Add(Programming.Text)
.DevelopStages.Items.Add(LevelCreation.Text)
.DevelopStages.Items.Add(ArtProduction.Text)
.DevelopStages.Items.Add(Testing.Text)
'set up everything
.AllWeeks.Text = TextBox1.Text
.Stage.Text = "Production"
'.RadialBar2.Maximum = (3000 * ProgressMax)
.RadialBar1.Maximum = DefinedWeeks.Text
.RadialBar1.Value = 0
.RadialBar2.Maximum = .DevelopStages.Items(0)
.RadialBar2.Value = 0
.Timer1.Enabled = True
End With
Me.Hide()
End Sub
Private Sub SlcClose1_Click(sender As Object, e As EventArgs) Handles SlcClose1.Click
Me.Hide()
End Sub
End Class