This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
XCIForm.vb
76 lines (64 loc) · 2.77 KB
/
XCIForm.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
Public Class XCIForm
Private Sub OpenXCI_Click(sender As Object, e As EventArgs) Handles OpenXCI.Click
SelectXCI.ShowDialog()
InFile.Text = SelectXCI.FileName
If InFile.Text = "Select a file." Then
InFile.Text = ""
End If
End Sub
Private Sub Start_Click(sender As Object, e As EventArgs) Handles Start.Click
If OutputDir.Text IsNot "" Then
Process.Start("cmd", "/c hactool -t xci " + "--outdir=" + OutputDir.Text + " " + """" + InFile.Text + """")
Else
MsgBox("You must type a folder name!")
End If
End Sub
Private Sub XCIForm_DragDrop(sender As Object, e As DragEventArgs) Handles MyBase.DragDrop
Dim DraggedFile() As String = e.Data.GetData(DataFormats.FileDrop)
For Each File In DraggedFile
InFile.Text = File
Next
PictureBox1.Visible = False
End Sub
Private Sub XCIForm_DragEnter(sender As Object, e As DragEventArgs) Handles MyBase.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
PictureBox1.Visible = True
End Sub
Private Sub XCIForm_DragLeave(sender As Object, e As EventArgs) Handles MyBase.DragLeave
PictureBox1.Visible = False
End Sub
Private Sub InFile_DragDrop(sender As Object, e As DragEventArgs) Handles InFile.DragDrop
Dim DraggedFile() As String = e.Data.GetData(DataFormats.FileDrop)
For Each File In DraggedFile
InFile.Text = File
Next
PictureBox1.Visible = False
End Sub
Private Sub InFile_DragEnter(sender As Object, e As DragEventArgs) Handles InFile.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
PictureBox1.Visible = True
End Sub
Private Sub InFile_DragLeave(sender As Object, e As EventArgs) Handles InFile.DragLeave
PictureBox1.Visible = False
End Sub
Private Sub OutputDir_DragDrop(sender As Object, e As DragEventArgs) Handles OutputDir.DragDrop
Dim DraggedFile() As String = e.Data.GetData(DataFormats.FileDrop)
For Each File In DraggedFile
InFile.Text = File
Next
PictureBox1.Visible = False
End Sub
Private Sub OutputDir_DragEnter(sender As Object, e As DragEventArgs) Handles OutputDir.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
PictureBox1.Visible = True
End Sub
Private Sub OutputDir_DragLeave(sender As Object, e As EventArgs) Handles OutputDir.DragLeave
PictureBox1.Visible = False
End Sub
End Class