mirror of
https://github.com/OpenLogics/MewtocolNet.git
synced 2025-12-06 03:01:24 +00:00
Fix multiple poller situational problems
This commit is contained in:
30
Examples.WPF/ViewModels/AppViewModel.cs
Normal file
30
Examples.WPF/ViewModels/AppViewModel.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using MewtocolNet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Examples.WPF.ViewModels {
|
||||
|
||||
public class AppViewModel : ViewModelBase {
|
||||
|
||||
private IPlc? plc;
|
||||
|
||||
public bool PlcIsNull => plc == null;
|
||||
|
||||
public bool PlcIsNotNull => plc != null;
|
||||
|
||||
public IPlc? Plc {
|
||||
get => plc;
|
||||
set {
|
||||
plc = value;
|
||||
OnPropChange();
|
||||
OnPropChange(nameof(PlcIsNull));
|
||||
OnPropChange(nameof(PlcIsNotNull));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user