From bd176283a963393237f4f09e0fc2dbc8096544c9 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 4 Jan 2015 10:47:12 -0800 Subject: [PATCH] Add simple config.ini for auto-loading on start --- pk3DS/Main.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pk3DS/Main.cs b/pk3DS/Main.cs index 093ec91..adbf053 100644 --- a/pk3DS/Main.cs +++ b/pk3DS/Main.cs @@ -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);