Fixed bool support and duplicate register refs

This commit is contained in:
Felix Weiß
2023-08-09 18:08:47 +02:00
parent a06a69be3f
commit 111eacb785
31 changed files with 599 additions and 277 deletions

View File

@@ -1,4 +1,5 @@
using MewtocolNet;
using Examples.WPF.RegisterCollections;
using MewtocolNet;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -10,6 +11,7 @@ namespace Examples.WPF.ViewModels {
public class AppViewModel : ViewModelBase {
private IPlc? plc;
private TestRegisterCollection testRegCollection = null!;
public bool PlcIsNull => plc == null;
@@ -25,6 +27,14 @@ namespace Examples.WPF.ViewModels {
}
}
public TestRegisterCollection TestRegCollection {
get => testRegCollection;
set {
testRegCollection = value;
OnPropChange();
}
}
}
}

View File

@@ -1,4 +1,5 @@
using MewtocolNet;
using Examples.WPF.RegisterCollections;
using MewtocolNet;
using MewtocolNet.Events;
using System;
using System.Collections.Generic;
@@ -14,6 +15,8 @@ public class PlcDataViewViewModel : ViewModelBase {
public IPlc Plc => App.ViewModel.Plc!;
public TestRegisterCollection RegCollection => App.ViewModel.TestRegCollection;
public ReconnectArgs PlcCurrentReconnectArgs {
get => plcCurrentReconnectArgs;
set {