2024-09-27 10:30:19 +08:00
|
|
|
|
using Net461DllTest.Device;
|
|
|
|
|
|
using Net461DllTest.Signal;
|
|
|
|
|
|
using Serein.Library.Attributes;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Net461DllTest.ViewModel
|
|
|
|
|
|
{
|
|
|
|
|
|
public class FromWorkBenchViewModel
|
|
|
|
|
|
{
|
2024-09-30 02:45:49 +08:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|