draft:执行shell抽成task,并支持配置 (#1306)

* Shell抽象成为一个Task,并抽出Config

* 代码格式化

* 格式化代码
This commit is contained in:
Takaranoao
2025-03-15 20:09:59 +08:00
committed by GitHub
parent 6eb1d33965
commit 981068b38c
6 changed files with 214 additions and 130 deletions

View File

@@ -0,0 +1,23 @@
using CommunityToolkit.Mvvm.ComponentModel;
using System;
namespace BetterGenshinImpact.Core.Config;
/// <summary>
/// shell执行配置
/// </summary>
[Serializable]
public partial class ShellConfig : ObservableObject
{
// 禁用Shell任务
[ObservableProperty] private bool _disable;
// 最长等待命令返回的时间,单位秒,<=0不等待,直接返回。
[ObservableProperty] private int _timeout = 60;
// 隐藏命令执行窗口
[ObservableProperty] private bool _noWindow = true;
// 向log打印命令执行输出
[ObservableProperty] private bool _output = true;
}