-
Notifications
You must be signed in to change notification settings - Fork 3
/
fPublisher.vb
135 lines (97 loc) · 4.92 KB
/
fPublisher.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
Public Class fPublisher
Private Sub fPublisher_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)
Call QuitDev()
End Sub
Private Sub fPublisher_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 ThePublisher_Click(sender As Object, e As EventArgs) Handles ThePublisher.Click
If My.Settings.SettingsSound = True then My.Computer.Audio.Play(My.Resources.openmenu, AudioPlayMode.Background)
End Sub
Private Sub ThePublisher_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ThePublisher.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 & " / " & ThePublisherData.Items.Count
z = z - 1
'Build the textbox
temp = ThePublisherData.Items(z)
y = InStr(temp, "^") + 1
TheQuest = Mid(temp, y)
txt_ThePublisher.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 > ThePublisherData.Items.Count Then Exit Sub
'Set the new item
lbl_Selected.Text = z & " / " & ThePublisherData.Items.Count
z = z - 1
'Build the textbox
temp = ThePublisherData.Items(z)
y = InStr(temp, "^") + 1
TheQuest = Mid(temp, y)
txt_ThePublisher.Text = TheQuest
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)
'name, timeframe, reward, percent
Dim y As Integer, z As Integer, temp As String
Dim CoName As String, TimeFrame As Integer, CashAward As Long, ThePer As Integer
'If ThePublisher.SelectedIndex = -1 Then Exit Sub
'z = ThePublisher.SelectedIndex
z = Mid(lbl_Selected.Text, 1, InStr(lbl_Selected.Text, "/") - 1) - 1
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Grabbing the data
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
y = InStr(ThePublisherData.Items(z), ",") - 1
CoName = Mid(ThePublisherData.Items(z), 1, y)
temp = Mid(ThePublisherData.Items(z), y + 2)
y = InStr(temp, ",") - 1
TimeFrame = Mid(temp, 1, y)
temp = Mid(temp, y + 2)
y = InStr(temp, ",") - 1
CashAward = Mid(temp, 1, y)
temp = Mid(temp, y + 2)
y = InStr(temp, "^") - 1
ThePer = Mid(temp, 1, y)
'name, timeframe, reward, percent
With FMain
.ThePublisher.Text = CoName
.OwedCut.Text = Val(ThePer)
.AllWeeks.Text = Val(TimeFrame)
.Cash.Text = Val(.Cash.Text) + Val(CashAward)
.DownPayment.Text = Math.Round(CashAward * 1.2)
.RadialBar1.Maximum = Val(TimeFrame)
.RadialBar1.Value = 0
End With
With fProject
.HScrollBar1.Maximum = Math.Round(FMain.AllWeeks.Text * 1.4)
.HScrollBar1.Minimum = Math.Round(FMain.AllWeeks.Text * 0.6)
.HScrollBar1.Value = FMain.AllWeeks.Text
.HScrollBar1.Enabled = False
.TextBox1.Text = Val(TimeFrame)
.TextBox1.Enabled = False
.Show()
End With
Me.Hide()
End Sub
Private Sub txt_ThePublisher_TextChanged(sender As Object, e As EventArgs) Handles txt_ThePublisher.TextChanged
End Sub
Private Sub ThePublisherData_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ThePublisherData.SelectedIndexChanged
End Sub
Private Sub lbl_Selected_Click(sender As Object, e As EventArgs) Handles lbl_Selected.Click
End Sub
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
End Sub
Private Sub SlcTheme1_Click(sender As Object, e As EventArgs) Handles SlcTheme1.Click
End Sub
End Class