Move examples from root to /Examples

This commit is contained in:
Felix Weiß
2023-08-21 16:21:55 +02:00
parent 47e50078b0
commit 993c3cba7e
26 changed files with 91 additions and 81 deletions

View File

@@ -0,0 +1,36 @@
using Examples.WPF.RegisterCollections;
using MewtocolNet;
using MewtocolNet.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Examples.WPF.ViewModels;
public class PlcDataViewViewModel : ViewModelBase {
private ReconnectArgs plcCurrentReconnectArgs = null!;
public IPlc Plc => App.ViewModel.Plc!;
public TestRegisterCollection RegCollection => App.ViewModel.TestRegCollection;
public ReconnectArgs PlcCurrentReconnectArgs {
get => plcCurrentReconnectArgs;
set {
plcCurrentReconnectArgs = value;
OnPropChange();
}
}
public PlcDataViewViewModel () {
Plc.ReconnectTryStarted += (s, e) => PlcCurrentReconnectArgs = e;
Plc.Reconnected += (s, e) => PlcCurrentReconnectArgs = null!;
Plc.Disconnected += (s, e) => PlcCurrentReconnectArgs = null!;
}
}