-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form2.vb
288 lines (241 loc) · 10.3 KB
/
Form2.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
Imports System.IO
Imports System.Security.Permissions
Imports System.Text.RegularExpressions
Imports System.Threading
Public Class Form2
Dim path As String
Dim drag As Boolean = False
Dim mousex As Integer, mousey As Integer
Dim path_sc As String
Dim path_cm As String
Private Sub Form5_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
drag = False
End Sub
Private Sub Form5_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
drag = True
mousex = Windows.Forms.Cursor.Position.X - Me.Left
mousey = Windows.Forms.Cursor.Position.Y - Me.Top
End Sub
Private Sub Form5_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
If drag Then
Me.Left = Windows.Forms.Cursor.Position.X - mousex
Me.Top = Windows.Forms.Cursor.Position.Y - mousey
End If
End Sub
Private Sub Panel1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseUp
drag = False
End Sub
Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
drag = True
mousex = Windows.Forms.Cursor.Position.X - Me.Left
mousey = Windows.Forms.Cursor.Position.Y - Me.Top
End Sub
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If drag Then
Me.Left = Windows.Forms.Cursor.Position.X - mousex
Me.Top = Windows.Forms.Cursor.Position.Y - mousey
End If
End Sub
Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click
Me.Close()
End Sub
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label13.Hide()
Label14.Hide()
If My.Settings.opened = 1 Then
Video_sc()
End If
If My.Settings.opened = 2 Then
Audio_sc()
End If
If My.Settings.opened = 3 Then
Queue_sc()
End If
' My.Settings.check_newScCm = "2"
For Each file As String In System.IO.Directory.GetFiles(path_sc)
ComboBox1.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
For Each file As String In System.IO.Directory.GetFiles(path_cm)
ComboBox2.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
ComboBox2.SelectedItem = My.Settings.ComboCm
ComboBox1.SelectedItem = My.Settings.ComboSc
' TextBox1.Text = File.ReadAllText(path_sc + ComboBox1.SelectedItem.ToString() + ".txt")
End Sub
Public Sub Queue_sc()
Label7.Text = "Video_settings"
Label8.Text = "Audio_settings"
Label5.Text = "Other_settings >>"
path_cm = ".\cmdline_etc\"
path_sc = ".\scripts_etc\"
' Label9.Text = "Queue_scripts >>"
My.Settings.opened = 3
My.Settings.check_newScCm = "2"
End Sub
Public Sub Video_sc()
Label7.Text = "Video_settings >>"
Label8.Text = "Audio_settings"
Label5.Text = "Other_settings"
path_cm = ".\cmdline_vdo\"
path_sc = ".\scripts_vdo\"
' Label9.Text = "Video_cmdline >>"
My.Settings.opened = 1
My.Settings.check_newScCm = "3"
End Sub
Public Sub Audio_sc()
Label7.Text = "Video_settings"
Label8.Text = "Audio_settings >>"
Label5.Text = "Other_settings"
path_cm = ".\cmdline_aud\"
path_sc = ".\scripts_aud\"
' Label9.Text = "Audio_cmdline >>"
My.Settings.opened = 2
My.Settings.check_newScCm = "4"
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
TextBox1.Text = System.IO.File.ReadAllText(path_sc + ComboBox1.SelectedItem.ToString() + ".txt")
My.Settings.ComboSc = ComboBox1.SelectedItem.ToString()
My.Settings.Chcom_CmSc = 1
End Sub
Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
TextBox1.Text = System.IO.File.ReadAllText(path_cm + ComboBox2.SelectedItem.ToString() + ".txt")
My.Settings.ComboCm = ComboBox2.SelectedItem.ToString()
My.Settings.Chcom_CmSc = 2
End Sub
' Queue
Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click
TextBox1.Text = ""
TextBox1.Refresh()
ComboBox1.Refresh()
ComboBox2.Refresh()
Queue_sc()
ComboBox1.ResetText()
ComboBox1.Items.Clear()
ComboBox2.ResetText()
ComboBox2.Items.Clear()
For Each file As String In System.IO.Directory.GetFiles(path_sc)
ComboBox1.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
For Each file As String In System.IO.Directory.GetFiles(path_cm)
ComboBox2.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
End Sub
Private Sub Label7_Click(sender As Object, e As EventArgs) Handles Label7.Click
TextBox1.Text = ""
TextBox1.Refresh()
ComboBox1.Refresh()
ComboBox2.Refresh()
Video_sc()
ComboBox1.ResetText()
ComboBox1.Items.Clear()
ComboBox2.ResetText()
ComboBox2.Items.Clear()
For Each file As String In System.IO.Directory.GetFiles(path_sc)
ComboBox1.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
For Each file As String In System.IO.Directory.GetFiles(path_cm)
ComboBox2.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
End Sub
Private Sub Label8_Click(sender As Object, e As EventArgs) Handles Label8.Click
TextBox1.Text = ""
TextBox1.Refresh()
ComboBox1.Refresh()
ComboBox2.Refresh()
Audio_sc()
ComboBox1.ResetText()
ComboBox1.Items.Clear()
ComboBox2.ResetText()
ComboBox2.Items.Clear()
For Each file As String In System.IO.Directory.GetFiles(path_sc)
ComboBox1.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
For Each file As String In System.IO.Directory.GetFiles(path_cm)
ComboBox2.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
End Sub
Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
My.Settings.SaDe = 2
If My.Settings.Chcom_CmSc = 1 Then
System.IO.File.Delete(path_sc + ComboBox1.SelectedItem.ToString() + ".txt")
End If
If My.Settings.Chcom_CmSc = 2 Then
System.IO.File.Delete(path_cm + ComboBox2.SelectedItem.ToString() + ".txt")
End If
Dim f4 As New Form4
Dim f3 As New Form2
Me.Close()
f3.Show()
f4.Show()
End Sub
Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click
My.Settings.SaDe = 1
If My.Settings.Chcom_CmSc = 1 Then
If ComboBox1.Text <> "" Then
File.WriteAllText(path_sc + ComboBox1.SelectedItem.ToString() + ".txt", TextBox1.Text)
End If
End If
If My.Settings.Chcom_CmSc = 2 Then
If ComboBox2.Text <> "" Then
File.WriteAllText(path_cm + ComboBox2.SelectedItem.ToString() + ".txt", TextBox1.Text)
End If
End If
Form4.Show()
' File.WriteAllText(path_sc + ComboBox2.SelectedItem.ToString() + ".txt", TextBox1.Text)
End Sub
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
'My.Settings.check_newScCm = "2"
Form6.Show()
Me.Close()
' Form1.ComboBox6.Refresh()
End Sub
Private Sub Label10_Click(sender As Object, e As EventArgs) Handles Label10.Click
'My.Settings.check_ScCm2 = "2"
Form7.Show()
Me.Close()
End Sub
Private Sub Label11_Click(sender As Object, e As EventArgs) Handles Label11.Click
ComboBox2.Text = ""
TextBox1.Text = "ID >> PATH" + vbNewLine
Dim fileEntries As String() = Directory.GetFiles(".\path_tools\", "*.txt")
' Process the list of .txt files found in the directory. '
Dim fileName As String
Dim sub_fl As String()
For Each fileName In fileEntries
sub_fl = fileName.Split("\")
sub_fl = sub_fl.Last.Split(".")
' MsgBox(fileName)
TextBox1.Text += sub_fl(0) + " >> " + System.IO.File.ReadAllText(fileName) + vbNewLine
Next
End Sub
Private Sub Label9_Click(sender As Object, e As EventArgs) Handles Label9.Click
Label13.Show()
Label14.Hide()
My.Settings.Chcom_CmSc = 1
End Sub
Private Sub Label12_Click(sender As Object, e As EventArgs) Handles Label12.Click
Label13.Hide()
Label14.Show()
My.Settings.Chcom_CmSc = 2
End Sub
Private Sub ComboBox1_MouseClick(sender As Object, e As MouseEventArgs) Handles ComboBox1.MouseClick
If ComboBox1.SelectedItem <> vbNullString Then
My.Settings.ComboSc = ComboBox1.SelectedItem.ToString()
TextBox1.Text = System.IO.File.ReadAllText(path_sc + ComboBox1.SelectedItem.ToString() + ".txt")
End If
Label13.Show()
Label14.Hide()
My.Settings.Chcom_CmSc = 1
End Sub
Private Sub ComboBox2_MouseClick(sender As Object, e As MouseEventArgs) Handles ComboBox2.MouseClick
If ComboBox2.SelectedItem <> vbNullString Then
My.Settings.ComboCm = ComboBox2.SelectedItem.ToString()
TextBox1.Text = System.IO.File.ReadAllText(path_cm + ComboBox2.SelectedItem.ToString() + ".txt")
End If
Label13.Hide()
Label14.Show()
My.Settings.Chcom_CmSc = 2
End Sub
Private Sub ComboBox2_Click(sender As Object, e As EventArgs) Handles ComboBox2.Click
End Sub
End Class