mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 18:34:44 +08:00
Fixed order of code in Program.cs causing exception from creating windows form before SetCompatibleTextRenderingDefault, changed dialog boxes a bit and cleaned up validation code in SelectFolderForm
This commit is contained in:
+3
-7
@@ -51,16 +51,12 @@ namespace CodeWalker
|
||||
|
||||
private void OkButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!Directory.Exists(SelectedFolder))
|
||||
if(!GTAFolder.ValidateGTAFolder(SelectedFolder, out string failReason))
|
||||
{
|
||||
MessageBox.Show("The folder \"" + SelectedFolder + "\" does not exist, or cannot be accessed. Please select another.");
|
||||
return;
|
||||
}
|
||||
if (!File.Exists(SelectedFolder + "\\gta5.exe"))
|
||||
{
|
||||
MessageBox.Show("GTA5.exe not found in folder:\n" + SelectedFolder);
|
||||
MessageBox.Show("The selected folder could not be used:\n\n" + failReason, "Invalid GTA Folder", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
Result = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user