mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-01-10 07:33:04 +08:00
Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder
This commit is contained in:
parent
d82c34c542
commit
6ae3b470f6
@ -41,9 +41,9 @@ namespace CodeWalker
|
|||||||
{
|
{
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||||
RpfMan = new RpfManager();
|
RpfMan = new RpfManager();
|
||||||
RpfMan.Init(Settings.Default.GTAFolder, UpdateStatus, UpdateStatus, false, false);
|
RpfMan.Init(GTAFolder.CurrentGTAFolder, UpdateStatus, UpdateStatus, false, false);
|
||||||
RPFScanComplete();
|
RPFScanComplete();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
2
BrowseForm.Designer.cs
generated
2
BrowseForm.Designer.cs
generated
@ -128,9 +128,9 @@
|
|||||||
//
|
//
|
||||||
this.FolderTextBox.Location = new System.Drawing.Point(90, 6);
|
this.FolderTextBox.Location = new System.Drawing.Point(90, 6);
|
||||||
this.FolderTextBox.Name = "FolderTextBox";
|
this.FolderTextBox.Name = "FolderTextBox";
|
||||||
|
this.FolderTextBox.ReadOnly = true;
|
||||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||||
this.FolderTextBox.TabIndex = 1;
|
this.FolderTextBox.TabIndex = 1;
|
||||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
|
||||||
//
|
//
|
||||||
// ScanButton
|
// ScanButton
|
||||||
//
|
//
|
||||||
|
@ -55,7 +55,7 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
DataHexLineCombo.Text = "16";
|
DataHexLineCombo.Text = "16";
|
||||||
|
|
||||||
DataTextBox.SetTabStopWidth(3);
|
DataTextBox.SetTabStopWidth(3);
|
||||||
@ -64,7 +64,7 @@ namespace CodeWalker
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||||
KeysLoaded = true;
|
KeysLoaded = true;
|
||||||
UpdateStatus("Ready to scan...");
|
UpdateStatus("Ready to scan...");
|
||||||
}
|
}
|
||||||
@ -82,19 +82,10 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
GTAFolder.UpdateGTAFolder(false);
|
||||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
if (res == DialogResult.OK)
|
|
||||||
{
|
|
||||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ScanButton_Click(object sender, EventArgs e)
|
private void ScanButton_Click(object sender, EventArgs e)
|
||||||
|
2
ExtractKeysForm.Designer.cs
generated
2
ExtractKeysForm.Designer.cs
generated
@ -77,9 +77,9 @@
|
|||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.FolderTextBox.Location = new System.Drawing.Point(98, 25);
|
this.FolderTextBox.Location = new System.Drawing.Point(98, 25);
|
||||||
this.FolderTextBox.Name = "FolderTextBox";
|
this.FolderTextBox.Name = "FolderTextBox";
|
||||||
|
this.FolderTextBox.ReadOnly = true;
|
||||||
this.FolderTextBox.Size = new System.Drawing.Size(345, 20);
|
this.FolderTextBox.Size = new System.Drawing.Size(345, 20);
|
||||||
this.FolderTextBox.TabIndex = 57;
|
this.FolderTextBox.TabIndex = 57;
|
||||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
|
||||||
//
|
//
|
||||||
// StatusLabel
|
// StatusLabel
|
||||||
//
|
//
|
||||||
|
@ -26,11 +26,11 @@ namespace CodeWalker
|
|||||||
|
|
||||||
private void ExtractKeysForm_Load(object sender, EventArgs e)
|
private void ExtractKeysForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||||
KeysLoaded = true;
|
KeysLoaded = true;
|
||||||
UpdateStatus("Keys loaded. Nothing to do here!");
|
UpdateStatus("Keys loaded. Nothing to do here!");
|
||||||
}
|
}
|
||||||
@ -41,20 +41,11 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
|
||||||
ExeTextBox.Text = FolderTextBox.Text + "\\" + "GTA5.exe";
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
GTAFolder.UpdateGTAFolder(false);
|
||||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
if (res == DialogResult.OK)
|
ExeTextBox.Text = GTAFolder.CurrentGTAFolder + @"\GTA5.exe";
|
||||||
{
|
|
||||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExeBrowseButton_Click(object sender, EventArgs e)
|
private void ExeBrowseButton_Click(object sender, EventArgs e)
|
||||||
|
2
ExtractRawForm.Designer.cs
generated
2
ExtractRawForm.Designer.cs
generated
@ -127,9 +127,9 @@
|
|||||||
//
|
//
|
||||||
this.FolderTextBox.Location = new System.Drawing.Point(91, 12);
|
this.FolderTextBox.Location = new System.Drawing.Point(91, 12);
|
||||||
this.FolderTextBox.Name = "FolderTextBox";
|
this.FolderTextBox.Name = "FolderTextBox";
|
||||||
|
this.FolderTextBox.ReadOnly = true;
|
||||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||||
this.FolderTextBox.TabIndex = 64;
|
this.FolderTextBox.TabIndex = 64;
|
||||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
|
||||||
//
|
//
|
||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
|
@ -26,12 +26,12 @@ namespace CodeWalker
|
|||||||
|
|
||||||
private void ExtractRawForm_Load(object sender, EventArgs e)
|
private void ExtractRawForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
OutputFolderTextBox.Text = Settings.Default.ExtractedRawFilesFolder;
|
OutputFolderTextBox.Text = Settings.Default.ExtractedRawFilesFolder;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||||
KeysLoaded = true;
|
KeysLoaded = true;
|
||||||
UpdateExtractStatus("Ready to extract.");
|
UpdateExtractStatus("Ready to extract.");
|
||||||
}
|
}
|
||||||
@ -58,11 +58,6 @@ namespace CodeWalker
|
|||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Settings.Default.ExtractedRawFilesFolder = OutputFolderTextBox.Text;
|
Settings.Default.ExtractedRawFilesFolder = OutputFolderTextBox.Text;
|
||||||
@ -70,12 +65,8 @@ namespace CodeWalker
|
|||||||
|
|
||||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
GTAFolder.UpdateGTAFolder(false);
|
||||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
if (res == DialogResult.OK)
|
|
||||||
{
|
|
||||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
|
2
ExtractScriptsForm.Designer.cs
generated
2
ExtractScriptsForm.Designer.cs
generated
@ -188,9 +188,9 @@
|
|||||||
//
|
//
|
||||||
this.FolderTextBox.Location = new System.Drawing.Point(98, 26);
|
this.FolderTextBox.Location = new System.Drawing.Point(98, 26);
|
||||||
this.FolderTextBox.Name = "FolderTextBox";
|
this.FolderTextBox.Name = "FolderTextBox";
|
||||||
|
this.FolderTextBox.ReadOnly = true;
|
||||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||||
this.FolderTextBox.TabIndex = 42;
|
this.FolderTextBox.TabIndex = 42;
|
||||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
|
||||||
//
|
//
|
||||||
// ExtractScriptsForm
|
// ExtractScriptsForm
|
||||||
//
|
//
|
||||||
|
@ -28,12 +28,12 @@ namespace CodeWalker
|
|||||||
private void ExtractForm_Load(object sender, EventArgs e)
|
private void ExtractForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DumpTextBox.Text = Settings.Default.GTAExeDumpFile;
|
DumpTextBox.Text = Settings.Default.GTAExeDumpFile;
|
||||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
OutputFolderTextBox.Text = Settings.Default.CompiledScriptFolder;
|
OutputFolderTextBox.Text = Settings.Default.CompiledScriptFolder;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||||
KeysLoaded = true;
|
KeysLoaded = true;
|
||||||
UpdateDumpStatus("Ready.");
|
UpdateDumpStatus("Ready.");
|
||||||
UpdateExtractStatus("Ready to extract.");
|
UpdateExtractStatus("Ready to extract.");
|
||||||
@ -49,11 +49,6 @@ namespace CodeWalker
|
|||||||
Settings.Default.GTAExeDumpFile = DumpTextBox.Text;
|
Settings.Default.GTAExeDumpFile = DumpTextBox.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Settings.Default.CompiledScriptFolder = OutputFolderTextBox.Text;
|
Settings.Default.CompiledScriptFolder = OutputFolderTextBox.Text;
|
||||||
@ -61,12 +56,8 @@ namespace CodeWalker
|
|||||||
|
|
||||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
GTAFolder.UpdateGTAFolder(false);
|
||||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
if (res == DialogResult.OK)
|
|
||||||
{
|
|
||||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
|
1
ExtractShadersForm.Designer.cs
generated
1
ExtractShadersForm.Designer.cs
generated
@ -127,6 +127,7 @@
|
|||||||
//
|
//
|
||||||
this.FolderTextBox.Location = new System.Drawing.Point(93, 12);
|
this.FolderTextBox.Location = new System.Drawing.Point(93, 12);
|
||||||
this.FolderTextBox.Name = "FolderTextBox";
|
this.FolderTextBox.Name = "FolderTextBox";
|
||||||
|
this.FolderTextBox.ReadOnly = true;
|
||||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||||
this.FolderTextBox.TabIndex = 64;
|
this.FolderTextBox.TabIndex = 64;
|
||||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
||||||
|
@ -26,12 +26,12 @@ namespace CodeWalker
|
|||||||
|
|
||||||
private void ExtractShadersForm_Load(object sender, EventArgs e)
|
private void ExtractShadersForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
OutputFolderTextBox.Text = Settings.Default.ExtractedShadersFolder;
|
OutputFolderTextBox.Text = Settings.Default.ExtractedShadersFolder;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||||
KeysLoaded = true;
|
KeysLoaded = true;
|
||||||
UpdateExtractStatus("Ready to extract.");
|
UpdateExtractStatus("Ready to extract.");
|
||||||
}
|
}
|
||||||
@ -41,10 +41,7 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
private void FolderTextBox_TextChanged(object sender, EventArgs e){}
|
||||||
{
|
|
||||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -53,12 +50,8 @@ namespace CodeWalker
|
|||||||
|
|
||||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
GTAFolder.UpdateGTAFolder(false);
|
||||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
if (res == DialogResult.OK)
|
|
||||||
{
|
|
||||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
|
2
ExtractTexForm.Designer.cs
generated
2
ExtractTexForm.Designer.cs
generated
@ -118,9 +118,9 @@
|
|||||||
//
|
//
|
||||||
this.FolderTextBox.Location = new System.Drawing.Point(90, 6);
|
this.FolderTextBox.Location = new System.Drawing.Point(90, 6);
|
||||||
this.FolderTextBox.Name = "FolderTextBox";
|
this.FolderTextBox.Name = "FolderTextBox";
|
||||||
|
this.FolderTextBox.ReadOnly = true;
|
||||||
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
this.FolderTextBox.Size = new System.Drawing.Size(251, 20);
|
||||||
this.FolderTextBox.TabIndex = 55;
|
this.FolderTextBox.TabIndex = 55;
|
||||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
|
||||||
//
|
//
|
||||||
// AbortButton
|
// AbortButton
|
||||||
//
|
//
|
||||||
|
@ -27,12 +27,12 @@ namespace CodeWalker
|
|||||||
|
|
||||||
private void ExtractTexForm_Load(object sender, EventArgs e)
|
private void ExtractTexForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
OutputFolderTextBox.Text = Settings.Default.ExtractedTexturesFolder;
|
OutputFolderTextBox.Text = Settings.Default.ExtractedTexturesFolder;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||||
KeysLoaded = true;
|
KeysLoaded = true;
|
||||||
UpdateExtractStatus("Ready to extract.");
|
UpdateExtractStatus("Ready to extract.");
|
||||||
}
|
}
|
||||||
@ -42,11 +42,6 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
private void OutputFolderTextBox_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Settings.Default.ExtractedTexturesFolder = OutputFolderTextBox.Text;
|
Settings.Default.ExtractedTexturesFolder = OutputFolderTextBox.Text;
|
||||||
@ -54,12 +49,8 @@ namespace CodeWalker
|
|||||||
|
|
||||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
GTAFolder.UpdateGTAFolder(false);
|
||||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
if (res == DialogResult.OK)
|
|
||||||
{
|
|
||||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
|
@ -117,9 +117,6 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
|
@ -149,7 +149,7 @@ namespace CodeWalker.Forms
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(FileName)) saveAs = true;
|
if (string.IsNullOrEmpty(FileName)) saveAs = true;
|
||||||
if (string.IsNullOrEmpty(FilePath)) saveAs = true;
|
if (string.IsNullOrEmpty(FilePath)) saveAs = true;
|
||||||
else if ((FilePath.ToLowerInvariant().StartsWith(Settings.Default.GTAFolder.ToLowerInvariant()))) saveAs = true;
|
else if ((FilePath.ToLowerInvariant().StartsWith(GTAFolder.CurrentGTAFolder.ToLowerInvariant()))) saveAs = true;
|
||||||
if (!File.Exists(FilePath)) saveAs = true;
|
if (!File.Exists(FilePath)) saveAs = true;
|
||||||
|
|
||||||
var fn = FilePath;
|
var fn = FilePath;
|
||||||
|
@ -137,38 +137,11 @@ namespace CodeWalker.Forms
|
|||||||
|
|
||||||
MouseWheel += ModelForm_MouseWheel;
|
MouseWheel += ModelForm_MouseWheel;
|
||||||
|
|
||||||
string fldr = Settings.Default.GTAFolder;
|
if (!GTAFolder.UpdateGTAFolder(true))
|
||||||
if (string.IsNullOrEmpty(fldr) || !Directory.Exists(fldr))
|
|
||||||
{
|
|
||||||
SelectFolderForm f = new SelectFolderForm();
|
|
||||||
f.ShowDialog();
|
|
||||||
if (f.Result == DialogResult.OK)
|
|
||||||
{
|
|
||||||
fldr = f.SelectedFolder;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!Directory.Exists(fldr))
|
|
||||||
{
|
|
||||||
MessageBox.Show("The specified folder does not exist:\n" + fldr);
|
|
||||||
Close();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!File.Exists(fldr + "\\gta5.exe"))
|
|
||||||
{
|
|
||||||
MessageBox.Show("GTA5.exe not found in folder:\n" + fldr);
|
|
||||||
Close();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Settings.Default.GTAFolder = fldr; //seems ok, save it for later
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MetaName[] texsamplers = RenderableGeometry.GetTextureSamplerList();
|
MetaName[] texsamplers = RenderableGeometry.GetTextureSamplerList();
|
||||||
foreach (var texsampler in texsamplers)
|
foreach (var texsampler in texsamplers)
|
||||||
|
@ -130,7 +130,7 @@ namespace CodeWalker.Forms
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(FileName)) saveAs = true;
|
if (string.IsNullOrEmpty(FileName)) saveAs = true;
|
||||||
if (string.IsNullOrEmpty(FilePath)) saveAs = true;
|
if (string.IsNullOrEmpty(FilePath)) saveAs = true;
|
||||||
else if ((FilePath.ToLowerInvariant().StartsWith(Settings.Default.GTAFolder.ToLowerInvariant()))) saveAs = true;
|
else if ((FilePath.ToLowerInvariant().StartsWith(GTAFolder.CurrentGTAFolder.ToLowerInvariant()))) saveAs = true;
|
||||||
if (!File.Exists(FilePath)) saveAs = true;
|
if (!File.Exists(FilePath)) saveAs = true;
|
||||||
|
|
||||||
var fn = FilePath;
|
var fn = FilePath;
|
||||||
|
@ -155,7 +155,7 @@ namespace CodeWalker.Forms
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(FileName)) saveAs = true;
|
if (string.IsNullOrEmpty(FileName)) saveAs = true;
|
||||||
if (string.IsNullOrEmpty(FilePath)) saveAs = true;
|
if (string.IsNullOrEmpty(FilePath)) saveAs = true;
|
||||||
else if ((FilePath.ToLowerInvariant().StartsWith(Settings.Default.GTAFolder.ToLowerInvariant()))) saveAs = true;
|
else if ((FilePath.ToLowerInvariant().StartsWith(GTAFolder.CurrentGTAFolder.ToLowerInvariant()))) saveAs = true;
|
||||||
if (!File.Exists(FilePath)) saveAs = true;
|
if (!File.Exists(FilePath)) saveAs = true;
|
||||||
|
|
||||||
var fn = FilePath;
|
var fn = FilePath;
|
||||||
|
@ -121,7 +121,7 @@ namespace CodeWalker.GameFiles
|
|||||||
RpfMan = new RpfManager();
|
RpfMan = new RpfManager();
|
||||||
RpfMan.ExcludePaths = GetExcludePaths();
|
RpfMan.ExcludePaths = GetExcludePaths();
|
||||||
RpfMan.EnableMods = EnableMods;
|
RpfMan.EnableMods = EnableMods;
|
||||||
RpfMan.Init(Settings.Default.GTAFolder, UpdateStatus, ErrorLog);//, true);
|
RpfMan.Init(GTAFolder.CurrentGTAFolder, UpdateStatus, ErrorLog);//, true);
|
||||||
|
|
||||||
//RE test area!
|
//RE test area!
|
||||||
//DecodeRelFiles();
|
//DecodeRelFiles();
|
||||||
|
@ -36,7 +36,7 @@ namespace CodeWalker
|
|||||||
{
|
{
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
GTA5Keys.LoadFromPath(Settings.Default.GTAFolder);
|
GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder);
|
||||||
GameFileCache gfc = new GameFileCache();
|
GameFileCache gfc = new GameFileCache();
|
||||||
gfc.DoFullStringIndex = true;
|
gfc.DoFullStringIndex = true;
|
||||||
gfc.Init(UpdateStatus, UpdateStatus);
|
gfc.Init(UpdateStatus, UpdateStatus);
|
||||||
|
@ -40,7 +40,7 @@ namespace CodeWalker
|
|||||||
// Always check the GTA folder first thing
|
// Always check the GTA folder first thing
|
||||||
if (!GTAFolder.UpdateGTAFolder(Properties.Settings.Default.RememberGTAFolder))
|
if (!GTAFolder.UpdateGTAFolder(Properties.Settings.Default.RememberGTAFolder))
|
||||||
{
|
{
|
||||||
MessageBox.Show("Could not load CodeWalker because no GTA 5 folder was selected. CodeWalker will now exit.", "GTA 5 Folder Not Found", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
MessageBox.Show("Could not load CodeWalker because no valid GTA 5 folder was selected. CodeWalker will now exit.", "GTA 5 Folder Not Found", MessageBoxButtons.OK, MessageBoxIcon.Stop);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
|
@ -25,7 +25,7 @@ namespace CodeWalker
|
|||||||
|
|
||||||
private void SelectFolderForm_Load(object sender, EventArgs e)
|
private void SelectFolderForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
RememberFolderCheckbox.Checked = Settings.Default.RememberGTAFolder;
|
RememberFolderCheckbox.Checked = Settings.Default.RememberGTAFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
28
SettingsForm.Designer.cs
generated
28
SettingsForm.Designer.cs
generated
@ -32,6 +32,7 @@
|
|||||||
this.MainTabControl = new System.Windows.Forms.TabControl();
|
this.MainTabControl = new System.Windows.Forms.TabControl();
|
||||||
this.ControlsTabPage = new System.Windows.Forms.TabPage();
|
this.ControlsTabPage = new System.Windows.Forms.TabPage();
|
||||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.MouseInvertCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
this.label4 = new System.Windows.Forms.Label();
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
this.label3 = new System.Windows.Forms.Label();
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
@ -79,8 +80,6 @@
|
|||||||
this.DoneButton = new System.Windows.Forms.Button();
|
this.DoneButton = new System.Windows.Forms.Button();
|
||||||
this.SaveButton = new System.Windows.Forms.Button();
|
this.SaveButton = new System.Windows.Forms.Button();
|
||||||
this.ResetButton = new System.Windows.Forms.Button();
|
this.ResetButton = new System.Windows.Forms.Button();
|
||||||
this.FolderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
|
|
||||||
this.MouseInvertCheckBox = new System.Windows.Forms.CheckBox();
|
|
||||||
this.MainTabControl.SuspendLayout();
|
this.MainTabControl.SuspendLayout();
|
||||||
this.ControlsTabPage.SuspendLayout();
|
this.ControlsTabPage.SuspendLayout();
|
||||||
this.groupBox2.SuspendLayout();
|
this.groupBox2.SuspendLayout();
|
||||||
@ -140,6 +139,17 @@
|
|||||||
this.groupBox2.TabStop = false;
|
this.groupBox2.TabStop = false;
|
||||||
this.groupBox2.Text = "Mouse settings";
|
this.groupBox2.Text = "Mouse settings";
|
||||||
//
|
//
|
||||||
|
// MouseInvertCheckBox
|
||||||
|
//
|
||||||
|
this.MouseInvertCheckBox.AutoSize = true;
|
||||||
|
this.MouseInvertCheckBox.Location = new System.Drawing.Point(240, 55);
|
||||||
|
this.MouseInvertCheckBox.Name = "MouseInvertCheckBox";
|
||||||
|
this.MouseInvertCheckBox.Size = new System.Drawing.Size(118, 17);
|
||||||
|
this.MouseInvertCheckBox.TabIndex = 9;
|
||||||
|
this.MouseInvertCheckBox.Text = "Invert mouse Y axis";
|
||||||
|
this.MouseInvertCheckBox.UseVisualStyleBackColor = true;
|
||||||
|
this.MouseInvertCheckBox.CheckedChanged += new System.EventHandler(this.MouseInvertCheckBox_CheckedChanged);
|
||||||
|
//
|
||||||
// label4
|
// label4
|
||||||
//
|
//
|
||||||
this.label4.AutoSize = true;
|
this.label4.AutoSize = true;
|
||||||
@ -739,9 +749,9 @@
|
|||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.FolderTextBox.Location = new System.Drawing.Point(110, 28);
|
this.FolderTextBox.Location = new System.Drawing.Point(110, 28);
|
||||||
this.FolderTextBox.Name = "FolderTextBox";
|
this.FolderTextBox.Name = "FolderTextBox";
|
||||||
|
this.FolderTextBox.ReadOnly = true;
|
||||||
this.FolderTextBox.Size = new System.Drawing.Size(303, 20);
|
this.FolderTextBox.Size = new System.Drawing.Size(303, 20);
|
||||||
this.FolderTextBox.TabIndex = 48;
|
this.FolderTextBox.TabIndex = 48;
|
||||||
this.FolderTextBox.TextChanged += new System.EventHandler(this.FolderTextBox_TextChanged);
|
|
||||||
//
|
//
|
||||||
// label5
|
// label5
|
||||||
//
|
//
|
||||||
@ -785,17 +795,6 @@
|
|||||||
this.ResetButton.UseVisualStyleBackColor = true;
|
this.ResetButton.UseVisualStyleBackColor = true;
|
||||||
this.ResetButton.Click += new System.EventHandler(this.ResetButton_Click);
|
this.ResetButton.Click += new System.EventHandler(this.ResetButton_Click);
|
||||||
//
|
//
|
||||||
// MouseInvertCheckBox
|
|
||||||
//
|
|
||||||
this.MouseInvertCheckBox.AutoSize = true;
|
|
||||||
this.MouseInvertCheckBox.Location = new System.Drawing.Point(240, 55);
|
|
||||||
this.MouseInvertCheckBox.Name = "MouseInvertCheckBox";
|
|
||||||
this.MouseInvertCheckBox.Size = new System.Drawing.Size(118, 17);
|
|
||||||
this.MouseInvertCheckBox.TabIndex = 9;
|
|
||||||
this.MouseInvertCheckBox.Text = "Invert mouse Y axis";
|
|
||||||
this.MouseInvertCheckBox.UseVisualStyleBackColor = true;
|
|
||||||
this.MouseInvertCheckBox.CheckedChanged += new System.EventHandler(this.MouseInvertCheckBox_CheckedChanged);
|
|
||||||
//
|
|
||||||
// SettingsForm
|
// SettingsForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@ -857,7 +856,6 @@
|
|||||||
private System.Windows.Forms.Label label6;
|
private System.Windows.Forms.Label label6;
|
||||||
private System.Windows.Forms.Button FolderBrowseButton;
|
private System.Windows.Forms.Button FolderBrowseButton;
|
||||||
private System.Windows.Forms.TextBox FolderTextBox;
|
private System.Windows.Forms.TextBox FolderTextBox;
|
||||||
private System.Windows.Forms.FolderBrowserDialog FolderBrowserDialog;
|
|
||||||
private System.Windows.Forms.Label label8;
|
private System.Windows.Forms.Label label8;
|
||||||
private System.Windows.Forms.NumericUpDown ShadowCascadesUpDown;
|
private System.Windows.Forms.NumericUpDown ShadowCascadesUpDown;
|
||||||
private System.Windows.Forms.Label label7;
|
private System.Windows.Forms.Label label7;
|
||||||
|
@ -71,7 +71,7 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
private void LoadAdvancedSettings()
|
private void LoadAdvancedSettings()
|
||||||
{
|
{
|
||||||
FolderTextBox.Text = Settings.Default.GTAFolder;
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
ExcludeFoldersTextBox.Text = Settings.Default.ExcludeFolders;
|
ExcludeFoldersTextBox.Text = Settings.Default.ExcludeFolders;
|
||||||
ShadowCascadesUpDown.Value = Settings.Default.ShadowCascades;
|
ShadowCascadesUpDown.Value = Settings.Default.ShadowCascades;
|
||||||
CacheSizeUpDown.Value = Math.Min(Math.Max(Settings.Default.CacheSize / 1048576, CacheSizeUpDown.Minimum), CacheSizeUpDown.Maximum);
|
CacheSizeUpDown.Value = Math.Min(Math.Max(Settings.Default.CacheSize / 1048576, CacheSizeUpDown.Minimum), CacheSizeUpDown.Maximum);
|
||||||
@ -270,21 +270,10 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void FolderTextBox_TextChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Settings.Default.GTAFolder = FolderTextBox.Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
private void FolderBrowseButton_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FolderBrowserDialog.SelectedPath = Settings.Default.GTAFolder;
|
GTAFolder.UpdateGTAFolder(false);
|
||||||
DialogResult res = FolderBrowserDialog.ShowDialog();
|
FolderTextBox.Text = GTAFolder.CurrentGTAFolder;
|
||||||
if (res == DialogResult.OK)
|
|
||||||
{
|
|
||||||
FolderTextBox.Text = FolderBrowserDialog.SelectedPath;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExcludeFoldersTextBox_TextChanged(object sender, EventArgs e)
|
private void ExcludeFoldersTextBox_TextChanged(object sender, EventArgs e)
|
||||||
|
@ -117,9 +117,6 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
|
@ -49,6 +49,7 @@ namespace CodeWalker
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string origFolder = CurrentGTAFolder;
|
||||||
string folder = CurrentGTAFolder;
|
string folder = CurrentGTAFolder;
|
||||||
SelectFolderForm f = new SelectFolderForm();
|
SelectFolderForm f = new SelectFolderForm();
|
||||||
f.ShowDialog();
|
f.ShowDialog();
|
||||||
@ -61,7 +62,10 @@ namespace CodeWalker
|
|||||||
if(ValidateGTAFolder(folder, out failReason))
|
if(ValidateGTAFolder(folder, out failReason))
|
||||||
{
|
{
|
||||||
SetGTAFolder(folder);
|
SetGTAFolder(folder);
|
||||||
MessageBox.Show($"Successfully set GTA Folder to \"{folder}\"", "Set GTA Folder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
if(folder != origFolder)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"Successfully changed GTA Folder to \"{folder}\"", "Set GTA Folder", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user