一些更改
This commit is contained in:
@@ -20,7 +20,7 @@ namespace CapMachine.Wpf.Models
|
||||
/// <summary>
|
||||
/// 实例化
|
||||
/// </summary>
|
||||
public MachineRunState(string name, IEventAggregator eventAggregator, ConfigService configService)
|
||||
public MachineRunState(string name, IEventAggregator eventAggregator, ConfigService configService, CanDriveService canDriveService, LinDriveService linDriveService)
|
||||
{
|
||||
Name = name;
|
||||
EventAggregator = eventAggregator;
|
||||
@@ -29,7 +29,7 @@ namespace CapMachine.Wpf.Models
|
||||
|
||||
}
|
||||
|
||||
private string _RunStateMsg="等待";
|
||||
private string _RunStateMsg = "等待";
|
||||
/// <summary>
|
||||
/// 运行状态
|
||||
/// </summary>
|
||||
@@ -39,10 +39,27 @@ namespace CapMachine.Wpf.Models
|
||||
set { _RunStateMsg = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
private bool _IsRunState;
|
||||
/// <summary>
|
||||
/// 是否运行状态
|
||||
/// </summary>
|
||||
public bool IsRunState
|
||||
{
|
||||
get { return _IsRunState; }
|
||||
set { _IsRunState = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
|
||||
private bool _IsProLoad;
|
||||
/// <summary>
|
||||
/// PLC程序是否下载
|
||||
/// </summary>
|
||||
public bool IsProLoad { get; set; }
|
||||
public bool IsProLoad
|
||||
{
|
||||
get { return _IsProLoad; }
|
||||
set { _IsProLoad = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 状态机
|
||||
@@ -320,22 +337,33 @@ namespace CapMachine.Wpf.Models
|
||||
Console.WriteLine($"{Name}-StopExitCall");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 进入停止状态
|
||||
/// </summary>
|
||||
private void StopEntryCall()
|
||||
{
|
||||
RunStateMsg = "停止";
|
||||
Console.WriteLine($"{Name}-StopEntryCall");
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void RunExitCall()
|
||||
{
|
||||
//退出运行状态
|
||||
IsRunState = false;
|
||||
Console.WriteLine($"{Name}-RunExitCall");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 进入运行状态
|
||||
/// </summary>
|
||||
private void RunEntryCall()
|
||||
{
|
||||
RunStateMsg = "运行";
|
||||
Console.WriteLine($"{Name}-RunEntryCall");
|
||||
|
||||
//进入运行状态
|
||||
IsRunState = true;
|
||||
}
|
||||
|
||||
private void AlarmExitCall()
|
||||
@@ -376,5 +404,7 @@ namespace CapMachine.Wpf.Models
|
||||
public string Name { get; set; }
|
||||
public IEventAggregator EventAggregator { get; }
|
||||
public ConfigService ConfigService { get; }
|
||||
public CanDriveService CanDriveService { get; }
|
||||
public LinDriveService LinDriveService { get; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user