48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using HMIToolkit;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using Heisig.HMI.AdsManager;
|
|
using CommunityToolkit.Mvvm.Input;
|
|
using TwinCAT.TypeSystem;
|
|
using System.Collections.ObjectModel;
|
|
using Common;
|
|
using InfineonHMI.Model;
|
|
namespace InfineonHMI;
|
|
|
|
public sealed partial class AlignmentStationPageVM : ObservableValidator, IDisposable
|
|
{
|
|
private readonly string? _variableName;
|
|
|
|
private readonly IAdsManager? _adsManager;
|
|
|
|
[ObservableProperty] private PackMLControlVM? alignmentPackMLControlVm;
|
|
|
|
[ObservableProperty]
|
|
private BinaryValveControlVM vacuumValveControlVm;
|
|
|
|
public AlignmentStationPageVM()
|
|
{
|
|
VacuumValveControlVm = new BinaryValveControlVM();
|
|
AlignmentPackMLControlVm = new();
|
|
AlignmentPackMLControlVm.STitle = "Ausrichtstation";
|
|
}
|
|
|
|
public AlignmentStationPageVM(IAdsManager adsManager, string variableName)
|
|
{
|
|
_adsManager = adsManager;
|
|
_variableName = variableName;
|
|
|
|
VacuumValveControlVm = new BinaryValveControlVM(_adsManager, _variableName + ".stVacuumValve");
|
|
AlignmentPackMLControlVm = new(_adsManager, _variableName + ".stStationCmds");
|
|
AlignmentPackMLControlVm.STitle = "Ausrichtstation";
|
|
}
|
|
|
|
|
|
|
|
public void Dispose()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
} |