20220510_191_upperpc/AutomaticApp/ViewModels/ControlPageViewModel.cs

41 lines
1.0 KiB
C#
Raw Normal View History

2023-07-27 02:57:34 +00:00
using AutomaticApp.Common;
using AutomaticApp.Model;
using AutomaticApp.Models;
using Communication;
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AutomaticApp.ViewModels
{
/// <summary>
/// 系统控制
/// </summary>
public class ControlPageViewModel : NotifyBase
{
//static public Switch_State SS1 { get; set; } = new Switch_State();
//static public State_FeedBack SFB1 { get; set; } = new State_FeedBack();
#region
public CommandBase Switch { set; get; }
#endregion
public ControlPageViewModel()
{
this.Switch = new CommandBase();
this.Switch.DoExcute = new Action<object>(Btn_Switch);
this.Switch.DoCanExcute = new Func<object, bool>((o) => true);
}
public void Btn_Switch(object o)
{
string a = o.ToString();
Console.WriteLine();
}
}
}