using System; using System.Application.Serialization; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace System.Application.Models.Settings { public static class GeneralSettings { static GeneralSettings() { WindowsStartupAutoRun.ValueChanged += WindowsStartupAutoRun_ValueChanged; IsEnableLogRecord.ValueChanged += IsEnableLogRecord_ValueChanged; //CreateDesktopShortcut.ValueChanged += CreateDesktopShortcut_ValueChanged; } private static void IsEnableLogRecord_ValueChanged(object sender, ValueChangedEventArgs e) { } private static void WindowsStartupAutoRun_ValueChanged(object sender, ValueChangedEventArgs e) { } /// /// 程序是否开机自启动 /// public static SerializableProperty WindowsStartupAutoRun { get; } = new SerializableProperty(GetKey(), Providers.Local, false) { AutoSave = true }; ///// ///// 创建桌面快捷方式 ///// //public static SerializableProperty CreateDesktopShortcut { get; } // = new SerializableProperty(GetKey(), Providers.Roaming, false) { AutoSave = true }; /// /// 程序启动时最小化 /// public static SerializableProperty IsStartupAppMinimized { get; } = new SerializableProperty(GetKey(), Providers.Local, false) { AutoSave = true }; /// /// 是否显示起始页 /// public static SerializableProperty IsShowStartPage { get; } = new SerializableProperty(GetKey(), Providers.Local, true) { AutoSave = true }; /// /// 启用游戏列表本地缓存 /// public static SerializableProperty IsSteamAppListLocalCache { get; } = new SerializableProperty(GetKey(), Providers.Local, true) { AutoSave = true }; /// /// 自动检查更新 /// public static SerializableProperty IsAutoCheckUpdate { get; } = new SerializableProperty(GetKey(), Providers.Local, true) { AutoSave = true }; /// /// 启用错误日志记录 /// public static SerializableProperty IsEnableLogRecord { get; } = new SerializableProperty(GetKey(), Providers.Local, false) { AutoSave = true }; private static string GetKey([CallerMemberName] string propertyName = "") { return nameof(GeneralSettings) + "." + propertyName; } } }