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"> <setting name="DefaultSaveVersion" serializeAs="String">
<value>GP</value> <value>GP</value>
</setting> </setting>
<setting name="DetectSaveOnStartup" serializeAs="String">
<value>True</value>
</setting>
</PKHeX.WinForms.Properties.Settings> </PKHeX.WinForms.Properties.Settings>
</userSettings> </userSettings>
<runtime> <runtime>

View file

@ -192,7 +192,8 @@ namespace PKHeX.WinForms
try try
#endif #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 WinFormsUtil.Error(path); // `path` contains the error message
bool savLoaded = false; bool savLoaded = false;

View file

@ -226,5 +226,17 @@ namespace PKHeX.WinForms.Properties {
this["DefaultSaveVersion"] = value; 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"> <Setting Name="DefaultSaveVersion" Type="PKHeX.Core.GameVersion" Scope="User">
<Value Profile="(Default)">GP</Value> <Value Profile="(Default)">GP</Value>
</Setting> </Setting>
<Setting Name="DetectSaveOnStartup" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>