mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-29 07:07:31 +08:00
added ISettingsManager implementation.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
//! \brief Persistent resource settings implementation.
|
||||
//
|
||||
|
||||
using System.ComponentModel.Composition;
|
||||
|
||||
namespace GameRes.Formats
|
||||
{
|
||||
internal class LocalResourceSetting : ResourceSettingBase
|
||||
@@ -12,4 +14,23 @@ namespace GameRes.Formats
|
||||
set { Properties.Settings.Default[Name] = value; }
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(ISettingsManager))]
|
||||
internal class SettingsManager : ISettingsManager
|
||||
{
|
||||
public void UpgradeSettings ()
|
||||
{
|
||||
if (Properties.Settings.Default.UpgradeRequired)
|
||||
{
|
||||
Properties.Settings.Default.Upgrade();
|
||||
Properties.Settings.Default.UpgradeRequired = false;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveSettings ()
|
||||
{
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user