| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using Prism.Mvvm;
- using System;
- using System.Collections.ObjectModel;
- namespace TeamAAS.Communication.Config
- {
- [Serializable]
- public class GlobalEventConfig : BindableBase
- {
- private ObservableCollection<HeartbeatConfig> _heartbeats = new ObservableCollection<HeartbeatConfig>();
- public ObservableCollection<HeartbeatConfig> Heartbeats
- {
- get => _heartbeats;
- set => SetProperty(ref _heartbeats, value);
- }
- private ObservableCollection<ProductSwitchEvent> _productSwitchEvents = new ObservableCollection<ProductSwitchEvent>();
- public ObservableCollection<ProductSwitchEvent> ProductSwitchEvents
- {
- get => _productSwitchEvents;
- set => SetProperty(ref _productSwitchEvents, value);
- }
- }
- [Serializable]
- public class HeartbeatConfig : BindableBase
- {
- private Guid _deviceId;
- public Guid DeviceId
- {
- get => _deviceId;
- set => SetProperty(ref _deviceId, value);
- }
- private string _deviceName = "";
- public string DeviceName
- {
- get => _deviceName;
- set => SetProperty(ref _deviceName, value);
- }
- private string _deviceType = "";
- public string DeviceType
- {
- get => _deviceType;
- set => SetProperty(ref _deviceType, value);
- }
- private bool _enabled = true;
- public bool Enabled
- {
- get => _enabled;
- set => SetProperty(ref _enabled, value);
- }
- private int _intervalMs = 3000;
- public int IntervalMs
- {
- get => _intervalMs;
- set => SetProperty(ref _intervalMs, value);
- }
- private int _timeoutMs = 1000;
- public int TimeoutMs
- {
- get => _timeoutMs;
- set => SetProperty(ref _timeoutMs, value);
- }
- }
- [Serializable]
- public class ProductSwitchEvent : BindableBase
- {
- private int _sequence;
- public int Sequence
- {
- get => _sequence;
- set => SetProperty(ref _sequence, value);
- }
- private string _productName = "";
- public string ProductName
- {
- get => _productName;
- set => SetProperty(ref _productName, value);
- }
- }
- }
|