Add hiding of save details in program title option

This commit is contained in:
Kurt 2018-08-13 19:11:58 -07:00
parent 61013b8f18
commit 10746ae45f
4 changed files with 23 additions and 1 deletions

View file

@ -46,6 +46,9 @@
<setting name="HoverSlotGlowEdges" serializeAs="String">
<value>True</value>
</setting>
<setting name="HideSAVDetails" serializeAs="String">
<value>False</value>
</setting>
</PKHeX.WinForms.Properties.Settings>
</userSettings>
<runtime>

View file

@ -364,6 +364,8 @@ namespace PKHeX.WinForms
{
new SettingsEditor(Settings.Default, nameof(Settings.Default.BAKPrompt)).ShowDialog();
// Reload text (if OT details hidden)
Text = GetProgramTitle(C_SAV.SAV);
// Update final settings
PKX.AllowShinySprite = Settings.Default.ShinySprites;
SaveFile.SetUpdateDex = Settings.Default.SetUpdateDex;
@ -820,6 +822,8 @@ namespace PKHeX.WinForms
private static string GetProgramTitle(SaveFile sav)
{
if (Settings.Default.HideSAVDetails)
return GetProgramTitle() + $" - {sav.GetType().Name}";
string title = GetProgramTitle() + $" - {sav.GetType().Name}: ";
if (!sav.Exportable) // Blank save file
return title + $"{sav.FileName} [{sav.OT} ({sav.Version})]";

View file

@ -12,7 +12,7 @@ namespace PKHeX.WinForms.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -178,5 +178,17 @@ namespace PKHeX.WinForms.Properties {
this["HoverSlotGlowEdges"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool HideSAVDetails {
get {
return ((bool)(this["HideSAVDetails"]));
}
set {
this["HideSAVDetails"] = value;
}
}
}
}

View file

@ -41,5 +41,8 @@
<Setting Name="HoverSlotGlowEdges" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="HideSAVDetails" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>