41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
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();
|
|
}
|
|
}
|
|
}
|