@@ -1,9 +1,9 @@
using BPASmartClient.CustomResource.UserControls;
using BPASmartClient.CustomResource.UserControls.MessageShow;
using BPASmartClient.FoodStationTest.Model;
using BPASmartClient .Helper;
using Microsoft.Toolkit.Mvvm.ComponentModel ;
using Microsoft.Toolkit.Mvvm.Input;
using BPA.Helper;
using BPA.Helper ;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
@@ -13,11 +13,11 @@ using System.Threading;
namespace BPASmartClient.FoodStationTest.ViewModel
{
public class ManualControlViewModel : ObservableObject
public class ManualControlViewModel : NotifyBase
{
public ManualControlViewModel()
{
ThreadManage.GetInstance() .StartLong(new Action(() =>
TaskManage.GetInstance .StartLong(new Action(() =>
{
PlcSystemMode = GVL_SmallStation.GetInstance.PlcSystemMode;
//SystemMode = GVL_SmallStation.GetInstance.PlcSystemMode ? "手动" : "自动";
@@ -216,80 +216,80 @@ namespace BPASmartClient.FoodStationTest.ViewModel
});
}
}
Open = new RelayCommand<object>((o) =>
Open = new BPA RelayCommand<object>((o) =>
{
ActionManage.GetInstance.Send("ManualOpen", o);
});
Close = new RelayCommand<object>((o) =>
Close = new BPA RelayCommand<object>((o) =>
{
ActionManage.GetInstance.Send("ManualClose", o);
});
StartAxisLoadCommand = new RelayCommand(() =>
StartAxisLoadCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StartAxisLoadCommand");
});
StopAxisLoadCommand = new RelayCommand(() =>
StopAxisLoadCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StopAxisLoadCommand");
});
StartAxisMidCommand = new RelayCommand(() =>
StartAxisMidCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StartAxisMidCommand");
});
StopAxisMidCommand = new RelayCommand(() =>
StopAxisMidCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StopAxisMidCommand");
});
StartAxisUnLoadCommand = new RelayCommand(() =>
StartAxisUnLoadCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StartAxisUnLoadCommand");
});
StopAxisUnLoadCommand = new RelayCommand(() =>
StopAxisUnLoadCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StopAxisUnLoadCommand");
});
StartAxis1Command = new RelayCommand(() =>
StartAxis1Command = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StartAxis1Command");
});
StopAxis1Command = new RelayCommand(() =>
StopAxis1Command = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StopAxis1Command");
});
StartAxis2Command = new RelayCommand(() =>
StartAxis2Command = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StartAxis2Command");
});
StopAxis2Command = new RelayCommand(() =>
StopAxis2Command = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("StopAxis2Command");
});
SystemStartCommand = new RelayCommand(() =>
SystemStartCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("SystemStart");
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统启动!");
});
SystemStopCommand = new RelayCommand(() =>
SystemStopCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("SystemStop");
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统停止!");
});
SystemPauseCommand = new RelayCommand(() =>
SystemPauseCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("SystemPause");
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停!");
});
SystemResetCommand = new RelayCommand(() =>
SystemResetCommand = new BPA RelayCommand(() =>
{
ActionManage.GetInstance.Send("SystemReset");
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停后复位!");
});
DebugMode = new RelayCommand(() =>
DebugMode = new BPA RelayCommand(() =>
{
// ActionManage.GetInstance.Send("SystemDebugMode");
});
AutoMode = new RelayCommand(() =>
AutoMode = new BPA RelayCommand(() =>
{
// ActionManage.GetInstance.Send("SystemAutoMode");
});
@@ -320,30 +320,30 @@ namespace BPASmartClient.FoodStationTest.ViewModel
{
StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName));
}
public RelayCommand<object> Open { get; set; }
public BPA RelayCommand<object> Open { get; set; }
public RelayCommand<object> Close { get; set; }
public BPA RelayCommand<object> Close { get; set; }
//五个电机手动控制
public RelayCommand StartAxisLoadCommand { get; set; }
public RelayCommand StopAxisLoadCommand { get; set; }
public RelayCommand StartAxisMidCommand { get; set; }
public RelayCommand StopAxisMidCommand { get; set; }
public RelayCommand StartAxisUnLoadCommand { get; set; }
public RelayCommand StopAxisUnLoadCommand { get; set; }
public RelayCommand StartAxis1Command { get; set; }
public RelayCommand StopAxis1Command { get; set; }
public RelayCommand StartAxis2Command { get; set; }
public RelayCommand StopAxis2Command { get; set; }
public BPA RelayCommand StartAxisLoadCommand { get; set; }
public BPA RelayCommand StopAxisLoadCommand { get; set; }
public BPA RelayCommand StartAxisMidCommand { get; set; }
public BPA RelayCommand StopAxisMidCommand { get; set; }
public BPA RelayCommand StartAxisUnLoadCommand { get; set; }
public BPA RelayCommand StopAxisUnLoadCommand { get; set; }
public BPA RelayCommand StartAxis1Command { get; set; }
public BPA RelayCommand StopAxis1Command { get; set; }
public BPA RelayCommand StartAxis2Command { get; set; }
public BPA RelayCommand StopAxis2Command { get; set; }
public RelayCommand SystemStartCommand { get; set; }
public RelayCommand SystemStopCommand { get; set; }
public RelayCommand SystemPauseCommand { get; set; }
public BPA RelayCommand SystemStartCommand { get; set; }
public BPA RelayCommand SystemStopCommand { get; set; }
public BPA RelayCommand SystemPauseCommand { get; set; }
public RelayCommand SystemResetCommand { get; set; }
public BPA RelayCommand SystemResetCommand { get; set; }
public RelayCommand AutoMode { get; set; }
public RelayCommand DebugMode { get; set; }
public BPA RelayCommand AutoMode { get; set; }
public BPA RelayCommand DebugMode { get; set; }
/// <summary>
/// 系统模式改变
@@ -409,7 +409,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel
public class CylinderModel : ObservableObject
public class CylinderModel : NotifyBase
{
public bool LeftTog { get { return _mLeftTog; } set { _mLeftTog = value; OnPropertyChanged(); } }
private bool _mLeftTog;