Push Changes from other Github
This commit is contained in:
@@ -1,28 +1,38 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using TwinCAT.TypeSystem;
|
||||
using Heisig.HMI.AdsManager;
|
||||
using InfineonHMI.Common;
|
||||
|
||||
namespace Common;
|
||||
|
||||
public sealed partial class ParamControlIntVm : ObservableValidator, IDisposable
|
||||
public sealed partial class ParamControlIntVm : ObservableValidator, IDisposable, IChangeTrackingEx
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string sName;
|
||||
private int initValue;
|
||||
|
||||
[ObservableProperty]
|
||||
private int value;
|
||||
|
||||
public ParamControlIntVm()
|
||||
{
|
||||
SName = "No Name:";
|
||||
Value = 0;
|
||||
}
|
||||
[ObservableProperty] private string sName;
|
||||
|
||||
[ObservableProperty] private int value;
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
public ParamControlIntVm()
|
||||
{
|
||||
SName = "No Name:";
|
||||
Value = 0;
|
||||
initValue = Value;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public void AcceptChanges()
|
||||
{
|
||||
initValue = Value;
|
||||
}
|
||||
|
||||
public bool IsChanged => initValue != Value;
|
||||
public void DiscardChanges()
|
||||
{
|
||||
Value = initValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user