Files
serein-flow/Net462DllTest/ViewModel/FromWorkBenchViewModel.cs

38 lines
809 B
C#
Raw Normal View History

using Net462DllTest.Device;
using Net462DllTest.Signal;
2024-09-27 10:30:19 +08:00
using Serein.Library.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Net462DllTest.ViewModel
2024-09-27 10:30:19 +08:00
{
public class FromWorkBenchViewModel
{
public FromWorkBenchViewModel(SiemensPlcDevice Device)
{
this.Device = Device;
}
private SiemensPlcDevice Device;
2024-09-27 10:30:19 +08:00
public string Name { get; set; }
public string GetDeviceInfo()
{
2024-09-28 23:55:19 +08:00
return Device?.ToString();
2024-09-27 10:30:19 +08:00
}
2024-09-30 16:36:55 +08:00
public void Trigger(CommandSignal signal,string spcaeNumber)
2024-09-27 10:30:19 +08:00
{
2024-09-28 23:55:19 +08:00
_ = Task.Run(() =>
{
Device.TriggerSignal(signal, spcaeNumber);
});
2024-09-27 10:30:19 +08:00
}
}
}