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
/
Copy pathPFS0Form.vb
76 lines (68 loc) · 3.03 KB
/
PFS0Form.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 PFS0Form
Private Sub OpenPFS0_Click(sender As Object, e As EventArgs) Handles OpenPFS0.Click
SelectPFS0.ShowDialog()
FileName.Text = SelectPFS0.FileName
If FileName.Text = "Select a file." Then
FileName.Text = ""
End If
End Sub
Private Sub ExtStart_Click(sender As Object, e As EventArgs) Handles ExtStart.Click
If ExtFolderName.Text IsNot "" Then
IO.Directory.CreateDirectory(ExtFolderName.Text)
Process.Start("cmd", "/c hactool -x --intype=pfs0 " + "--outdir=" + ExtFolderName.Text + " " + """" + FileName.Text + """")
Else
MsgBox("You must type a folder name!")
End If
End Sub
Private Sub PFS0Form_DragDrop(sender As Object, e As DragEventArgs) Handles MyBase.DragDrop
Dim DraggedFile() As String = e.Data.GetData(DataFormats.FileDrop)
For Each File In DraggedFile
FileName.Text = File
Next
PictureBox1.Visible = False
End Sub
Private Sub PFS0Form_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.AllowDrop = True
End Sub
Private Sub PFS0Form_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 FileName_DragDrop(sender As Object, e As DragEventArgs) Handles FileName.DragDrop
Dim DraggedFile() As String = e.Data.GetData(DataFormats.FileDrop)
For Each File In DraggedFile
FileName.Text = File
Next
PictureBox1.Visible = False
End Sub
Private Sub FileName_DragEnter(sender As Object, e As DragEventArgs) Handles FileName.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
PictureBox1.Visible = True
End Sub
Private Sub PFS0Form_DragLeave(sender As Object, e As EventArgs) Handles MyBase.DragLeave
PictureBox1.Visible = False
End Sub
Private Sub FileName_DragLeave(sender As Object, e As EventArgs) Handles FileName.DragLeave
PictureBox1.Visible = False
End Sub
Private Sub ExtFolderName_DragDrop(sender As Object, e As DragEventArgs) Handles ExtFolderName.DragDrop
Dim DraggedFile() As String = e.Data.GetData(DataFormats.FileDrop)
For Each File In DraggedFile
FileName.Text = File
Next
PictureBox1.Visible = False
End Sub
Private Sub ExtFolderName_DragEnter(sender As Object, e As DragEventArgs) Handles ExtFolderName.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
PictureBox1.Visible = True
End Sub
Private Sub ExtFolderName_DragLeave(sender As Object, e As EventArgs) Handles ExtFolderName.DragLeave
PictureBox1.Visible = False
End Sub
End Class