forked from BeyondDimension/SteamTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
698 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Application.Serialization; | ||
|
||
namespace System.Application.Models.Settings | ||
{ | ||
public sealed class ASFSettings : SettingsHost2<ASFSettings> | ||
{ | ||
static ASFSettings() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// ASF路径 | ||
/// </summary> | ||
public static SerializableProperty<string> ArchiSteamFarmExePath { get; } | ||
= GetProperty(defaultValue: string.Empty, autoSave: true); | ||
|
||
/// <summary> | ||
/// 程序启动时自动运行ASF | ||
/// </summary> | ||
public static SerializableProperty<bool> AutoRunArchiSteamFarm { get; } | ||
= GetProperty(defaultValue: false, autoSave: true); | ||
} | ||
} |
175 changes: 175 additions & 0 deletions
175
src/ST.Client.Desktop/Models/Settings2/GameLibrarySettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
using System.Application.Serialization; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace System.Application.Models.Settings | ||
{ | ||
public sealed class GameLibrarySettings : SettingsHost2<GameLibrarySettings> | ||
{ | ||
public static readonly Lazy<ReadOnlyCollection<uint>> DefaultIgnoreList = new(new ReadOnlyCollection<uint>(new uint[] | ||
{ | ||
5, | ||
7, | ||
8, | ||
90, | ||
92, | ||
205, | ||
211, | ||
215, | ||
218, | ||
310, | ||
364, | ||
459, | ||
480, | ||
513, | ||
563, | ||
564, | ||
575, | ||
629, | ||
635, | ||
640, | ||
644, | ||
740, | ||
745, | ||
753, | ||
760, | ||
761, | ||
764, | ||
765, | ||
766, | ||
767, | ||
1007, | ||
1213, | ||
1255, | ||
1260, | ||
1273, | ||
2145, | ||
2403, | ||
4270, | ||
4940, | ||
8680, | ||
8710, | ||
8730, | ||
8770, | ||
12250, | ||
12750, | ||
13180, | ||
13260, | ||
16830, | ||
16864, | ||
16865, | ||
16871, | ||
16872, | ||
16879, | ||
17505, | ||
17515, | ||
17525, | ||
17535, | ||
17555, | ||
17575, | ||
17585, | ||
17705, | ||
43110, | ||
61800, | ||
61810, | ||
61820, | ||
61830, | ||
104700, | ||
201700, | ||
224220, | ||
232610, | ||
375350, | ||
245550, | ||
254000, | ||
254020, | ||
254040, | ||
259280, | ||
285050, | ||
312710, | ||
314700, | ||
321040, | ||
329950, | ||
331710, | ||
344750, | ||
354850, | ||
368900, | ||
373110, | ||
383030, | ||
385200, | ||
388870, | ||
392050, | ||
392870, | ||
395980, | ||
397620, | ||
399580, | ||
407730, | ||
407740, | ||
407750, | ||
410590, | ||
410700, | ||
416270, | ||
428430, | ||
431270, | ||
432150, | ||
447880, | ||
449630, | ||
457930, | ||
457940, | ||
460660, | ||
461570, | ||
462370, | ||
463620, | ||
473580, | ||
473620, | ||
473630, | ||
473640, | ||
473650, | ||
486340, | ||
488200, | ||
491250, | ||
492240, | ||
496600, | ||
501690, | ||
505440, | ||
509840, | ||
516230, | ||
516700, | ||
524440, | ||
526790, | ||
528210, | ||
533710, | ||
545950, | ||
546450, | ||
559500, | ||
559940, | ||
562020, | ||
576080, | ||
576440, | ||
581620, | ||
592490, | ||
603770, | ||
603780, | ||
605470, | ||
654310, | ||
700580 | ||
})); | ||
|
||
/// <summary> | ||
/// 隐藏的游戏列表 | ||
/// </summary> | ||
public static SerializableProperty<Dictionary<uint, string?>> HideGameList { get; } | ||
= GetProperty(defaultValue: new Dictionary<uint, string?>(), autoSave: true); | ||
|
||
/// <summary> | ||
/// 挂时长游戏列表 | ||
/// </summary> | ||
public static SerializableProperty<Dictionary<uint, string?>> AFKAppList { get; } | ||
= GetProperty(defaultValue: new Dictionary<uint, string?>(), autoSave: true); | ||
|
||
/// <summary> | ||
/// 启用自动挂机 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsAutoAFKApps { get; } | ||
= GetProperty(defaultValue: true, autoSave: true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
using System.Application.Serialization; | ||
using System.Application.Services; | ||
using System.Collections.Generic; | ||
using System.Properties; | ||
|
||
namespace System.Application.Models.Settings | ||
{ | ||
public sealed class GeneralSettings : SettingsHost2<GeneralSettings> | ||
{ | ||
static GeneralSettings() | ||
{ | ||
#if !__MOBILE__ | ||
WindowsStartupAutoRun.ValueChanged += WindowsStartupAutoRun_ValueChanged; | ||
//CreateDesktopShortcut.ValueChanged += CreateDesktopShortcut_ValueChanged; | ||
#endif | ||
} | ||
|
||
#if !__MOBILE__ | ||
private static void WindowsStartupAutoRun_ValueChanged(object? sender, ValueChangedEventArgs<bool> e) | ||
{ | ||
DI.Get<IDesktopPlatformService>().SetBootAutoStart(e.NewValue, ThisAssembly.AssemblyTrademark); | ||
} | ||
|
||
public static void InitWindowsStartupAutoRun() | ||
{ | ||
WindowsStartupAutoRun_ValueChanged(null, new(default, WindowsStartupAutoRun.Value)); | ||
} | ||
|
||
/// <summary> | ||
/// 程序是否开机自启动 | ||
/// </summary> | ||
public static SerializableProperty<bool> WindowsStartupAutoRun { get; } | ||
= GetProperty(defaultValue: false, autoSave: true); | ||
|
||
///// <summary> | ||
///// 创建桌面快捷方式 | ||
///// </summary> | ||
//public static SerializableProperty<bool> CreateDesktopShortcut { get; } | ||
// = new SerializableProperty<bool>(GetKey(), Providers.Roaming, false) { AutoSave = true }; | ||
|
||
/// <summary> | ||
/// 程序启动时最小化 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsStartupAppMinimized { get; } | ||
= GetProperty(defaultValue: false, autoSave: true); | ||
|
||
/// <summary> | ||
/// 是否显示起始页 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsShowStartPage { get; } | ||
= GetProperty(defaultValue: true, autoSave: true); | ||
|
||
/// <summary> | ||
/// 启用游戏列表本地缓存 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsSteamAppListLocalCache { get; } | ||
= GetProperty(defaultValue: true, autoSave: true); | ||
#endif | ||
|
||
/// <summary> | ||
/// 自动检查更新 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsAutoCheckUpdate { get; } | ||
= GetProperty(defaultValue: true, autoSave: true); | ||
|
||
/// <summary> | ||
/// 启用错误日志记录 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsEnableLogRecord { get; } | ||
= GetProperty(defaultValue: false, autoSave: true); | ||
|
||
/// <summary> | ||
/// 用户设置的文本阅读器提供商,根据平台值不同,值格式为 枚举字符串 或 程序路径 | ||
/// </summary> | ||
public static SerializableProperty<IReadOnlyDictionary<Platform, string>> TextReaderProvider { get; } | ||
= GetProperty(defaultValue: (IReadOnlyDictionary<Platform, string>?)null, autoSave: true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
using System.Application.Serialization; | ||
using System.Collections.Generic; | ||
using System.Net; | ||
|
||
namespace System.Application.Models.Settings | ||
{ | ||
public sealed class ProxySettings : SettingsHost2<ProxySettings> | ||
{ | ||
/// <summary> | ||
/// 启用脚本自动检查更新 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsAutoCheckScriptUpdate { get; } | ||
= GetProperty(defaultValue: true, autoSave: true); | ||
|
||
/// <summary> | ||
/// 启用GOG插件代理 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsProxyGOG { get; } | ||
= GetProperty(defaultValue: false, autoSave: true); | ||
|
||
/// <summary> | ||
/// 启用windows系统代理模式 | ||
/// </summary> | ||
public static SerializableProperty<bool> EnableWindowsProxy { get; } | ||
= GetProperty(defaultValue: false, autoSave: true); | ||
|
||
/// <summary> | ||
/// 启用代理脚本 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsEnableScript { get; } | ||
= GetProperty(defaultValue: false, autoSave: true); | ||
|
||
/// <summary> | ||
/// 程序启动时自动启动代理 | ||
/// </summary> | ||
public static SerializableProperty<bool> ProgramStartupRunProxy { get; } | ||
= GetProperty(defaultValue: false, autoSave: true); | ||
|
||
/// <summary> | ||
/// 是否只针对Steam内置浏览器启用脚本 | ||
/// </summary> | ||
public static SerializableProperty<bool> IsOnlyWorkSteamBrowser { get; } | ||
= GetProperty(defaultValue: false, autoSave: true); | ||
|
||
/// <summary> | ||
/// 代理服务启用状态 | ||
/// </summary> | ||
public static SerializableProperty<IReadOnlyCollection<string>> SupportProxyServicesStatus { get; } | ||
= GetProperty(defaultValue: (IReadOnlyCollection<string>)new List<string>(), autoSave: false); | ||
|
||
/// <summary> | ||
/// 系统代理模式端口 | ||
/// </summary> | ||
public static SerializableProperty<int> SystemProxyPortId { get; } | ||
= GetProperty(defaultValue: 26501, autoSave: false); | ||
|
||
/// <summary> | ||
/// 系统代理模式IP | ||
/// </summary> | ||
public static SerializableProperty<string> SystemProxyIp { get; } | ||
= GetProperty(defaultValue: IPAddress.Loopback.ToString(), autoSave: false); | ||
|
||
/// <summary> | ||
/// 脚本启用状态 | ||
/// </summary> | ||
public static SerializableProperty<IReadOnlyCollection<int>> ScriptsStatus { get; } | ||
= GetProperty(defaultValue: (IReadOnlyCollection<int>)new List<int>(), autoSave: true); | ||
} | ||
} |
Oops, something went wrong.