增加了初始弹窗,但是没有成功
更改了CAN和LIN协调 更改了配置程序的名称顺序
This commit is contained in:
68
CapMachine.Wpf/Models/CanLinRunStateModel.cs
Normal file
68
CapMachine.Wpf/Models/CanLinRunStateModel.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static CapMachine.Wpf.Models.ComEnum;
|
||||
|
||||
namespace CapMachine.Wpf.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// CAN 和 LIN运行的状态汇总模型
|
||||
/// </summary>
|
||||
public class CanLinRunStateModel:BindableBase
|
||||
{
|
||||
private CanLinEnum _CurSysSelectedCanLin;
|
||||
/// <summary>
|
||||
/// 当前系统选中使用的CanLin状态
|
||||
/// </summary>
|
||||
public CanLinEnum CurSysSelectedCanLin
|
||||
{
|
||||
get { return _CurSysSelectedCanLin; }
|
||||
set
|
||||
{
|
||||
_CurSysSelectedCanLin = value;
|
||||
switch (value)
|
||||
{
|
||||
case CanLinEnum.No:
|
||||
SelectedCanLinMsg = "无";
|
||||
CanLinRunState = false;
|
||||
break;
|
||||
case CanLinEnum.Can:
|
||||
SelectedCanLinMsg = "CAN";
|
||||
CanLinRunState=true;
|
||||
break;
|
||||
case CanLinEnum.Lin:
|
||||
SelectedCanLinMsg = "LIN";
|
||||
CanLinRunState = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool _CanLinRunState;
|
||||
/// <summary>
|
||||
/// CAN 和 LIN的运行状态
|
||||
/// </summary>
|
||||
public bool CanLinRunState
|
||||
{
|
||||
get { return _CanLinRunState; }
|
||||
set { _CanLinRunState = value;RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
|
||||
private string? _SelectedCanLinMsg;
|
||||
/// <summary>
|
||||
/// CANLIN 选择的字符串
|
||||
/// </summary>
|
||||
public string? SelectedCanLinMsg
|
||||
{
|
||||
get { return _SelectedCanLinMsg; }
|
||||
set { _SelectedCanLinMsg = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user