更新LIN 的驱动
This commit is contained in:
@@ -19,6 +19,7 @@ using System.Windows.Controls;
|
||||
using Microsoft.Win32;
|
||||
using static CapMachine.Wpf.Models.ComEnum;
|
||||
using ImTools;
|
||||
using System.Windows.Controls.Primitives;
|
||||
|
||||
namespace CapMachine.Wpf.ViewModels
|
||||
{
|
||||
@@ -990,6 +991,47 @@ namespace CapMachine.Wpf.ViewModels
|
||||
set { _HandSpeed = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
private DelegateCommand<object> _LinHandEnableCmd;
|
||||
/// <summary>
|
||||
/// Lin 手动 模式,是否使能,用于报文的使能和非使能的数据
|
||||
/// True代表使能,False代表禁用
|
||||
/// </summary>
|
||||
public DelegateCommand<object> LinHandEnableCmd
|
||||
{
|
||||
set
|
||||
{
|
||||
_LinHandEnableCmd = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
if (_LinHandEnableCmd == null)
|
||||
{
|
||||
_LinHandEnableCmd = new DelegateCommand<object>((p) => LinHandEnableCmdCall(p));
|
||||
}
|
||||
return _LinHandEnableCmd;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// LIN 手动 模式,是否使能,用于报文的使能和非使能的数据
|
||||
/// True代表使能,False代表禁用
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void LinHandEnableCmdCall(object Par)
|
||||
{
|
||||
if (Par != null && Par is ToggleButton)
|
||||
{
|
||||
var ControlData = Par as ToggleButton;
|
||||
var Name = ControlData.ToolTip;
|
||||
var Data = ControlData.IsChecked;
|
||||
//ToDo cmd
|
||||
//LinDriveService.LinHandEnable = (bool)Data!;
|
||||
//给使能数据
|
||||
LinDriveService.UpdateCapEnableCmdDataByHand((bool)Data!);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user