-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathFNewConsole.vb
127 lines (98 loc) · 4.68 KB
/
FNewConsole.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
Public Class FNewConsole
Private Sub GameName_TextChanged(sender As Object, e As EventArgs) Handles ConsoleName.TextChanged
End Sub
Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim x As Long, CoName As String
x = GetRandom(1, 10)
If x >= 0 And x <= 3 Then
CoName = FMain.Console1.Items(GetRandom(0, FMain.Console1.Items.Count))
Else
CoName = FMain.Console1.Items(GetRandom(0, FMain.Console1.Items.Count))
CoName = CoName & " " & FMain.Console2.Items(GetRandom(0, FMain.Console2.Items.Count))
End If
ConsoleName.Text = CoName
End Sub
Private Sub SlCbtn1_Click(sender As Object, e As EventArgs) Handles SlCbtn1.Click
If My.Settings.SettingsSound = True then My.Computer.Audio.Play(My.Resources.menuselect, AudioPlayMode.Background)
If Len(ConsoleName.Text) <= 3 Then
MsgBox("You need a longer name for a console.", MsgBoxStyle.Exclamation)
Exit Sub
End If
If Len(ConsoleName.Text) >= 16 Then
MsgBox("You need a shorter name for a console.", MsgBoxStyle.Exclamation)
Exit Sub
End If
If DefinedWeeks.Text <> TextBox1.Text Then
MsgBox("The defined timeline does not match the amount of weeks.", MsgBoxStyle.Exclamation)
Exit Sub
End If
With FMain
.DevelopStages.Items.Clear()
.DevelopStages.Items.Add(TheHardware.Text)
.DevelopStages.Items.Add(TheSoftware.Text)
.DevelopStages.Items.Add(TheProgramming.Text)
.DevelopStages.Items.Add(TheVideoandAudio.Text)
'set up everything
.Console.Text = ConsoleName.Text
.Console.Checked = True
.AllWeeks.Text = HScrollBar1.Value
.Stage.Text = "Hardware Design"
.CoMarketing.Text = 0
.RadialBar1.Maximum = DefinedWeeks.Text
.RadialBar1.Value = 0
.RadialBar2.Maximum = .DevelopStages.Items(0)
.RadialBar2.Value = 0
.uCPU.Text = 0
.uMemory.Text = 0
.uSoftware.Text = 0
.uProgramming.Text = 0
.uStorage.Text = 0
.uVideo.Text = 0
.uAudio.Text = 0
End With
Me.Hide()
End Sub
Private Sub HScrollBar1_Scroll(sender As Object) Handles HScrollBar1.Scroll
TextBox1.Text = HScrollBar1.Value
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim TheSplit As Long, Diff As Long
TheSplit = Math.Round(TextBox1.Text / 4)
TheHardware.Text = TheSplit
TheSoftware.Text = TheSplit
TheProgramming.Text = TheSplit
TheVideoandAudio.Text = TheSplit
TrackBar2.Value = TheSplit
TrackBar3.Value = TheSplit
TrackBar4.Value = TheSplit
BaWGUITrackBar1.Value = TheSplit
If TextBox1.Text < DefinedWeeks.Text Then
Diff = Val(TextBox1.Text) - Val(DefinedWeeks.Text)
TheHardware.Text = Val(TheHardware.Text) + Diff
End If
If TextBox1.Text > DefinedWeeks.Text Then
Diff = Val(TextBox1.Text) - Val(DefinedWeeks.Text)
TheHardware.Text = Val(TheHardware.Text) - Diff
End If
End Sub
Private Sub TrackBar2_Scroll(sender As Object) Handles TrackBar2.Scroll
TheHardware.Text = TrackBar2.Value
DefinedWeeks.Text = Val(TheHardware.Text) + Val(TheSoftware.Text) + Val(TheProgramming.Text) + Val(TheVideoandAudio.Text)
End Sub
Private Sub TrackBar3_Scroll(sender As Object) Handles TrackBar3.Scroll
TheProgramming.Text = TrackBar3.Value
DefinedWeeks.Text = Val(TheHardware.Text) + Val(TheSoftware.Text) + Val(TheProgramming.Text) + Val(TheVideoandAudio.Text)
End Sub
Private Sub TrackBar4_Scroll(sender As Object) Handles TrackBar4.Scroll
TheSoftware.Text = TrackBar4.Value
DefinedWeeks.Text = Val(TheHardware.Text) + Val(TheSoftware.Text) + Val(TheProgramming.Text) + Val(TheVideoandAudio.Text)
End Sub
Private Sub BaWGUITrackBar1_Scroll(sender As Object) Handles BaWGUITrackBar1.Scroll
TheVideoandAudio.Text = BaWGUITrackBar1.Value
DefinedWeeks.Text = Val(TheHardware.Text) + Val(TheSoftware.Text) + Val(TheProgramming.Text) + Val(TheVideoandAudio.Text)
End Sub
Private Sub Label8_Click(sender As Object, e As EventArgs) Handles Label8.Click
End Sub
End Class