-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfEngineProj.vb
176 lines (148 loc) · 7.74 KB
/
fEngineProj.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
166
167
168
169
170
171
172
173
174
175
176
Public Class fEngineProj
Private Sub fEngineProj_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 Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim TotalPer As Integer
TotalPer = TextBox1.Text
'issue here
TheInput.Text = Math.Round(Math.Round(TotalPer * (15 / 100)))
'HScrollBar1.Maximum = Val(TotalPer)
'HScrollBar1.Value = Val(TheInput.Text)
ThePhysics.Text = Math.Round(TotalPer * (25 / 100))
TrackBar3.Maximum = Val(TotalPer)
TrackBar3.Value = Val(ThePhysics.Text)
TheScripting.Text = Math.Round(TotalPer * (25 / 100))
TrackBar4.Maximum = Val(TotalPer)
TrackBar4.Value = Val(TheScripting.Text)
TheNetworking.Text = Math.Round(TotalPer * (15 / 100))
TrackBar5.Maximum = Val(TotalPer)
TrackBar5.Value = Val(TheNetworking.Text)
TheGUI.Text = Math.Round(TotalPer * (15 / 100))
TrackBar6.Maximum = Val(TotalPer)
TrackBar6.Value = Val(TheGUI.Text)
GraphicsnSound.Text = Math.Round(TotalPer * (15 / 100))
TrackBar7.Maximum = Val(TotalPer)
TrackBar7.Value = Val(GraphicsnSound.Text)
DefinedWeeks.Text = Val(TheInput.Text) + Val(ThePhysics.Text) + Val(TheScripting.Text) + Val(TheNetworking.Text) + Val(TheGUI.Text) + Val(GraphicsnSound.Text)
Do Until DefinedWeeks.Text = TextBox1.Text
TotalPer = GetRandom(1, 6) 'randomly select which one drops
Select Case TotalPer
Case Is = 1
If DefinedWeeks.Text < TextBox1.Text Then
TheInput.Text = TheInput.Text + 1
Else
TheInput.Text = TheInput.Text - 1
End If
HScrollBar1.Value = TheInput.Text
Case Is = 2
If DefinedWeeks.Text < TextBox1.Text Then
ThePhysics.Text = ThePhysics.Text + 1
Else
ThePhysics.Text = ThePhysics.Text - 1
End If
TrackBar3.Value = ThePhysics.Text
Case Is = 3
If DefinedWeeks.Text < TextBox1.Text Then
TheScripting.Text = TheScripting.Text + 1
Else
TheScripting.Text = TheScripting.Text - 1
End If
TrackBar4.Value = TheScripting.Text
Case Is = 4
If DefinedWeeks.Text < TextBox1.Text Then
TheNetworking.Text = TheNetworking.Text + 1
Else
TheNetworking.Text = TheNetworking.Text - 1
End If
TrackBar5.Value = TheNetworking.Text
Case Is = 5
If DefinedWeeks.Text < TextBox1.Text Then
TheGUI.Text = TheGUI.Text + 1
Else
TheGUI.Text = TheGUI.Text - 1
End If
TrackBar6.Value = TheGUI.Text
Case Is = 6
If DefinedWeeks.Text < TextBox1.Text Then
GraphicsnSound.Text = TheGUI.Text + 1
Else
GraphicsnSound.Text = TheGUI.Text - 1
End If
TrackBar7.Value = TheGUI.Text
End Select
DefinedWeeks.Text = Val(TheInput.Text) + Val(ThePhysics.Text) + Val(TheScripting.Text) + Val(TheNetworking.Text) + Val(TheGUI.Text) + Val(GraphicsnSound.Text)
Loop
Call MsgBox("Below is the recommended schedule. Adjust as you deem necessary.", vbInformation)
End Sub
Private Sub SlcScrollBar1_Scroll(sender As Object)
TheInput.Text = HScrollBar1.Value
DefinedWeeks.Text = Val(TheInput.Text) + Val(ThePhysics.Text) + Val(TheScripting.Text) + Val(TheNetworking.Text) + Val(TheGUI.Text) + Val(GraphicsnSound.Text)
End Sub
Private Sub BaWGUITrackBar1_Scroll(sender As Object) Handles HScrollBar1.Scroll
TextBox1.Text = HScrollBar1.Value
End Sub
Private Sub TrackBar2_Scroll(sender As Object) Handles TrackBar2.Scroll
TheInput.Text = TrackBar2.Value
DefinedWeeks.Text = Val(TheInput.Text) + Val(ThePhysics.Text) + Val(TheScripting.Text) + Val(TheNetworking.Text) + Val(TheGUI.Text) + Val(GraphicsnSound.Text)
End Sub
Private Sub TrackBar3_Scroll(sender As Object) Handles TrackBar3.Scroll
ThePhysics.Text = TrackBar3.Value
DefinedWeeks.Text = Val(TheInput.Text) + Val(ThePhysics.Text) + Val(TheScripting.Text) + Val(TheNetworking.Text) + Val(TheGUI.Text) + Val(GraphicsnSound.Text)
End Sub
Private Sub TrackBar4_Scroll(sender As Object) Handles TrackBar4.Scroll
TheScripting.Text = TrackBar4.Value
DefinedWeeks.Text = Val(TheInput.Text) + Val(ThePhysics.Text) + Val(TheScripting.Text) + Val(TheNetworking.Text) + Val(TheGUI.Text) + Val(GraphicsnSound.Text)
End Sub
Private Sub TrackBar5_Scroll(sender As Object) Handles TrackBar5.Scroll
TheNetworking.Text = TrackBar5.Value
DefinedWeeks.Text = Val(TheInput.Text) + Val(ThePhysics.Text) + Val(TheScripting.Text) + Val(TheNetworking.Text) + Val(TheGUI.Text) + Val(GraphicsnSound.Text)
End Sub
Private Sub BaWGUITrackBar5_Scroll(sender As Object) Handles TrackBar6.Scroll
TheGUI.Text = TrackBar6.Value
DefinedWeeks.Text = Val(TheInput.Text) + Val(ThePhysics.Text) + Val(TheScripting.Text) + Val(TheNetworking.Text) + Val(TheGUI.Text) + Val(GraphicsnSound.Text)
End Sub
Private Sub TrackBar7_Scroll(sender As Object) Handles TrackBar7.Scroll
GraphicsnSound.Text = TrackBar7.Value
DefinedWeeks.Text = Val(TheInput.Text) + Val(ThePhysics.Text) + Val(TheScripting.Text) + Val(TheNetworking.Text) + Val(TheGUI.Text) + Val(GraphicsnSound.Text)
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 timeline.", vbCritical)
Exit Sub
End If
With FMain
.DevelopStages.Items.Clear()
.DevelopStages.Items.Add(TheInput.Text)
.DevelopStages.Items.Add(ThePhysics.Text)
.DevelopStages.Items.Add(TheScripting.Text)
.DevelopStages.Items.Add(TheNetworking.Text)
.DevelopStages.Items.Add(TheGUI.Text)
.DevelopStages.Items.Add(GraphicsnSound.Text)
'reset
.uInput.Text = 0
.uPhysics.Text = 0
.uScripts.Text = 0
.uNetwork.Text = 0
.uGUI.Text = 0
.uGraphics.Text = 0
.uSound.Text = 0
'set up everything
.Panel3.Visible = True
.Engine.Checked = True
.AllWeeks.Text = TextBox1.Text
.Stage.Text = "Input"
'.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