-
Notifications
You must be signed in to change notification settings - Fork 1
/
PCSX2TextureForm.cs
94 lines (83 loc) · 2.57 KB
/
PCSX2TextureForm.cs
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.IO;
namespace NFL2K5Tool
{
public partial class PCSX2TextureForm : Form
{
GamesaveTool mTool = null;
public PCSX2TextureForm(GamesaveTool tool )
{
mTool = tool;
InitializeComponent();
}
private void showYamlToolStripMenuItem_Click(object sender, EventArgs e)
{
ShowYaml();
}
public void ShowYaml()
{
if (mTool != null)
{
mTextBox.Text = mTool.GetPlayerPhotoPCSX2Yaml();
}
}
public void ShowBatchFile()
{
if (mTool != null)
{
mTextBox.Text = mTool.GenPlayerPhotoPCSX2_data_2022_BatchFile();
}
}
private void mClearButton_Click(object sender, EventArgs e)
{
mTextBox.Clear();
}
private void clearToolStripMenuItem_Click(object sender, EventArgs e)
{
mTextBox.Clear();
}
private void Close_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
Close();
}
private void checkTexturesToolStripMenuItem_Click(object sender, EventArgs e)
{
String path = null;
FolderBrowserDialog dlg = new FolderBrowserDialog();
dlg.Description = "Choose PCSX2 'textures' folder";
if (dlg.ShowDialog() == DialogResult.OK)
{
path = dlg.SelectedPath;
}
dlg.Dispose();
if (path != null)
{
string filePath = "";
Regex fileRegex = new Regex("\"(.*)\"");
MatchCollection mc = fileRegex.Matches(mTextBox.Text);
StringBuilder sb = new StringBuilder();
foreach (Match m in mc)
{
filePath = path + "\\" + m.Groups[1].ToString().Replace("/", "\\");
if (!File.Exists(filePath))
{
sb.Append("file '");
sb.Append(filePath);
//sb.Append(m.Groups[0].ToString());
sb.Append("' does not exist\n");
}
}
MessageForm.ShowMessage("Check these", sb.ToString());
}
}
}
}