Add simple config.ini for auto-loading on start

This commit is contained in:
Kurt
2015-01-04 10:47:12 -08:00
parent 7d994da811
commit bd176283a9

View File

@@ -24,6 +24,11 @@ public Main()
TB_Path.DragEnter += tabMain_DragEnter;
TB_Path.DragDrop += tabMain_DragDrop;
CB_Lang.SelectedIndex = 2;
if (File.Exists("config.ini"))
{
string path = File.ReadAllText("config.ini");
if (path.Length > 0) openQuick(path);
}
}
public bool oras = false;
public volatile int threads = 0;
@@ -273,6 +278,7 @@ private string getFileName(int A, int B, int C)
private void formClosing(object sender, FormClosingEventArgs e)
{
this.Hide();
if (TB_Path.Text.Length > 0) File.WriteAllText("config.ini", TB_Path.Text);
if (!GB_Tools.Enabled) return; // No data/threads need to be addressed if we haven't loaded anything.
// Set the GameText back as other forms may have edited it.
threadSet(TB_Path.Text + getGARCFileName("gametext"), "gametext", false);