速度的拓展参数对应

This commit is contained in:
2025-04-14 10:33:49 +08:00
parent 4a07d45b25
commit 43e0ff62e7
10 changed files with 470 additions and 52 deletions

View File

@@ -2658,6 +2658,7 @@ namespace CapMachine.Wpf.ViewModels
return _SpeedConstSaveCmd;
}
}
/// <summary>
/// 常值保存命令 速度
/// </summary>
@@ -3250,6 +3251,74 @@ namespace CapMachine.Wpf.ViewModels
}
private DelegateCommand<string> _SpeedExdDefaultCmd;
/// <summary>
/// 速度的默认参数 PID LIMIT ALARM NO 配置弹窗
/// </summary>
public DelegateCommand<string> SpeedExdDefaultCmd
{
set
{
_SpeedExdDefaultCmd = value;
}
get
{
if (_SpeedExdDefaultCmd == null)
{
_SpeedExdDefaultCmd = new DelegateCommand<string>((str) => SpeedExdDefaultCmdMethod(str));
}
return _SpeedExdDefaultCmd;
}
}
/// <summary>
/// 速度的默认参数 PID LIMIT ALARM NO 配置弹窗
/// </summary>
/// <param name="str"></param>
/// <exception cref="NotImplementedException"></exception>
private void SpeedExdDefaultCmdMethod(string Par)
{
switch (Par)
{
case "PID":
//弹窗
DialogService.ShowDialog("DialogPIDConfigView", new DialogParameters() { { "Name", "转速" } }, (par) =>
{
if (par.Result == ButtonResult.OK)
{
//程序名称
var ReturnValue = par.Parameters.GetValue<string>("Name");
}
else if (par.Result == ButtonResult.Cancel)
{
//取消
}
});
break;
case "Limit":
//弹窗
DialogService.ShowDialog("DialogLimitConfigView", new DialogParameters() { { "Name", "转速" } }, (par) =>
{
if (par.Result == ButtonResult.OK)
{
//程序名称
var ReturnValue = par.Parameters.GetValue<string>("Name");
}
else if (par.Result == ButtonResult.Cancel)
{
//取消
}
});
break;
default:
break;
}
}
#endregion
/// <summary>