-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfContract.vb
132 lines (98 loc) · 4.7 KB
/
fContract.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
Public Class fContract
Private Sub fContract_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 fContract_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 TheContract_Click(sender As Object, e As EventArgs)
If My.Settings.SettingsSound = True then My.Computer.Audio.Play(My.Resources.openmenu, AudioPlayMode.Background)
End Sub
Private Sub TheContract_SelectedIndexChanged(sender As Object, e As EventArgs)
End Sub
Private Sub SlCbtn3_Click(sender As Object, e As EventArgs) Handles SlCbtn3.Click
If My.Settings.SettingsSound = True then My.Computer.Audio.Play(My.Resources.menuselect, AudioPlayMode.Background)
'name, cost, timeframe, arttime, techtime
Dim TheName As String, TheCost As String, TimeFrame As String, ArtTime As Long, TechTime As Long, TheQuest As String
Dim temp As String, y As Integer, z As Integer
z = Mid(lbl_Selected.Text, 1, InStr(lbl_Selected.Text, "/") - 1) - 1
If z > (TheContractData.Items.Count - 1) Then z = TheContractData.Items.Count - 1
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Grabbing the data
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
y = InStr(TheContractData.Items(z), ",") - 1
TheName = Mid(TheContractData.Items(z), 1, y)
temp = Mid(TheContractData.Items(z), y + 2)
y = InStr(temp, ",") - 1
TheCost = Mid(temp, 1, y)
temp = Mid(temp, y + 2)
y = InStr(temp, ",") - 1
TimeFrame = Mid(temp, 1, y)
temp = Mid(temp, y + 2)
y = InStr(temp, ",") - 1
ArtTime = Mid(temp, 1, y)
temp = Mid(temp, y + 2)
y = InStr(temp, "^") - 1
TechTime = Mid(temp, 1, y)
TheQuest = Mid(temp, y + 2)
'name, cost, timeframe, arttime, techtime
With FMain
.AllWeeks.Text = Val(TimeFrame)
.ConCash.Text = Val(TheCost)
.cArt.Text = Val(ArtTime)
.cTech.Text = Val(TechTime)
.RadialBar2.Value = 0
.RadialBar2.Maximum = Math.Round(Val(TechTime) + Val(ArtTime))
.RadialBar1.Value = 0
.RadialBar1.Maximum = TimeFrame
.Contract.Checked = True
.Label19.Enabled = True
.Label20.Enabled = True
.Stage.Text = "Contracting"
.uArt.Text = 0
.uDesign.Text = 0
.uGameplay.Text = 0
.uReplay.Text = 0
.uStory.Text = 0
.uMusic.Text = 0
.uBugs.Text = 0
.Label9.Enabled = False
End With
Me.Hide()
End Sub
Private Sub TheContractData_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TheContractData.SelectedIndexChanged
End Sub
Private Sub SlCbtn1_Click(sender As Object, e As EventArgs) Handles SlCbtn1.Click
Dim y As Integer, z As Integer, temp As String, TheQuest As String
' Gather variables
z = Mid(lbl_Selected.Text, 1, InStr(lbl_Selected.Text, "/") - 2) - 1
'Check last item
If z < 1 Then Exit Sub
'Set the new item
lbl_Selected.Text = z & " / " & TheContractData.Items.Count
'Build the textbox
z = z - 1
temp = TheContractData.Items(z)
y = InStr(temp, "^") + 1
TheQuest = Mid(temp, y)
txt_TheJob.Text = TheQuest
End Sub
Private Sub SlCbtn2_Click(sender As Object, e As EventArgs) Handles SlCbtn2.Click
Dim y As Integer, z As Integer, temp As String, TheQuest As String
' Gather variables
z = Mid(lbl_Selected.Text, 1, InStr(lbl_Selected.Text, "/") - 2) + 1
'Check last item
If z > TheContractData.Items.Count Then Exit Sub
'Set the new item
lbl_Selected.Text = z & " / " & TheContractData.Items.Count
'Build the textbox
z = z - 1
temp = TheContractData.Items(z)
y = InStr(temp, "^") + 1
TheQuest = Mid(temp, y)
txt_TheJob.Text = TheQuest
End Sub
Private Sub SlcClose1_Click(sender As Object, e As EventArgs) Handles SlcClose1.Click
Me.Hide()
End Sub
End Class