上机bug修复,命令修复添加

This commit is contained in:
hsc
2026-07-21 14:36:15 +08:00
parent 9661e5f063
commit 4386449925
8 changed files with 471 additions and 194 deletions

View File

@@ -92,9 +92,9 @@ namespace DeviceEditModule.ViewModels
set => SetProperty(ref _currentLimit, value);
}
private string _selectedMode = "AC";
private PowerCouplingMode _selectedMode = PowerCouplingMode.AC;
/// <summary>待设置的电源工作模式AC / DC / ACDC。</summary>
public string SelectedMode
public PowerCouplingMode SelectedMode
{
get => _selectedMode;
set => SetProperty(ref _selectedMode, value);

View File

@@ -155,8 +155,7 @@ namespace DeviceEditModule.ViewModels
public ICommand SetOcpCommand { get; }
public ICommand SetOppCommand { get; }
public ICommand ClearAlarmCommand { get; }
public ICommand SetRemoteModeCommand { get; }
public ICommand SetLocalModeCommand { get; }
#endregion
@@ -174,8 +173,7 @@ namespace DeviceEditModule.ViewModels
SetOcpCommand = new DelegateCommand(async () => await Exec(async () => { await _device!._OCP(OcpValue, Ct()); AppendLog($"OCP已设为 {OcpValue} A"); }));
SetOppCommand = new DelegateCommand(async () => await Exec(async () => { await _device!._OPP(OppValue, Ct()); AppendLog($"OPP已设为 {OppValue} W"); }));
ClearAlarmCommand = new DelegateCommand(async () => await Exec(async () => { await _device!.(Ct()); AppendLog("保护告警已清除"); }));
SetRemoteModeCommand = new DelegateCommand(async () => await Exec(async () => { await _device!.(Ct()); AppendLog("已切换到远程控制模式"); }));
SetLocalModeCommand = new DelegateCommand(async () => await Exec(async () => { await _device!.(Ct()); AppendLog("已切换到本地控制模式"); }));
SetLoadValueCommand = new DelegateCommand(async () => await Exec(async () =>
{