Add setting to skip save detection on load

This commit is contained in:
Kurt 2018-12-26 17:17:44 -08:00
parent 423afa4518
commit 36fb61ab09
4 changed files with 20 additions and 1 deletions

View file

@ -58,6 +58,9 @@
<setting name="DefaultSaveVersion" serializeAs="String">
<value>GP</value>
</setting>
<setting name="DetectSaveOnStartup" serializeAs="String">
<value>True</value>
</setting>
</PKHeX.WinForms.Properties.Settings>
</userSettings>
<runtime>

View file

@ -192,7 +192,8 @@ namespace PKHeX.WinForms
try
#endif
{
if (!DetectSaveFile(out string path) && path != null)
string path = null;
if (Settings.Default.DetectSaveOnStartup && !DetectSaveFile(out path) && path != null)
WinFormsUtil.Error(path); // `path` contains the error message
bool savLoaded = false;

View file

@ -226,5 +226,17 @@ namespace PKHeX.WinForms.Properties {
this["DefaultSaveVersion"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool DetectSaveOnStartup {
get {
return ((bool)(this["DetectSaveOnStartup"]));
}
set {
this["DetectSaveOnStartup"] = value;
}
}
}
}

View file

@ -53,5 +53,8 @@
<Setting Name="DefaultSaveVersion" Type="PKHeX.Core.GameVersion" Scope="User">
<Value Profile="(Default)">GP</Value>
</Setting>
<Setting Name="DetectSaveOnStartup" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>