mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-14 20:53:30 +08:00
重构了 `AvatarClassifyGen.cs` 中的图像读取逻辑,现在只读取一个图像文件。`AllConfig.cs` 中添加了 `ScriptConfig` 类的配置,并监听其属性变化。`ScriptRepoUpdater.cs` 中引入了多个新命名空间,添加了 `_logger` 和 `_webWindow` 字段,新增了 `AutoUpdate` 方法,修改了 `UpdateCenterRepo` 方法,新增了 `FindCenterRepoPath`、`ImportScriptFromUri` 和 `OpenLocalRepoInWebView` 方法。`WebpagePanel.cs` 中添加了 `OnWebViewInitializedAction` 属性。`WebpageWindow.cs` 中注释掉了背景色设置。`MainWindow.xaml` 中修改了标题栏图标路径。`JsListPage.xaml`、`KeyMouseRecordPage.xaml` 和 `MapPathingPage.xaml` 中修改了按钮命令绑定。`MainWindowViewModel.cs` 中添加了 `AutoUpdate` 方法调用。`JsListViewModel.cs`、`KeyMouseRecordPageViewModel.cs` 和 `MapPathingViewModel.cs` 中添加了 `Config` 属性和 `OnOpenLocalScriptRepo` 命令。新增了 `ScriptConfig.cs` 和 `RepoWebBridge.cs` 文件,定义了 `ScriptConfig` 和 `RepoWebBridge` 类。
29 lines
751 B
C#
29 lines
751 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace BetterGenshinImpact.Core.Config;
|
|
|
|
/// <summary>
|
|
/// 脚本配置
|
|
/// </summary>
|
|
[Serializable]
|
|
public partial class ScriptConfig : ObservableObject
|
|
{
|
|
// 自动更新脚本仓库周期(天)
|
|
[ObservableProperty]
|
|
private int _autoUpdateScriptRepoPeriod = 1;
|
|
|
|
// 上次更新脚本仓库时间
|
|
[ObservableProperty]
|
|
private DateTime _lastUpdateScriptRepoTime = DateTime.MinValue;
|
|
|
|
// 脚本仓库按钮红点是否展示
|
|
[ObservableProperty]
|
|
private bool _scriptRepoHintDotVisible = false;
|
|
|
|
// 已订阅的脚本路径列表
|
|
[ObservableProperty]
|
|
private List<string> _subscribedScriptPaths = [];
|
|
}
|