|
|
@@ -8,6 +8,7 @@ using System.Collections.ObjectModel; |
|
|
|
using System.Linq; |
|
|
|
using System.Reflection; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Windows; |
|
|
|
|
|
|
|
namespace BPASmartClient.CustomResource.Pages.Model |
|
|
@@ -15,6 +16,18 @@ namespace BPASmartClient.CustomResource.Pages.Model |
|
|
|
|
|
|
|
public class AlarmHelper<AlarmT> where AlarmT : class, new() |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
//private volatile static ConcurrentDictionary<string, AlarmT> _Instance; |
|
|
|
//public static AlarmT GetInstance(string name) |
|
|
|
//{ |
|
|
|
// if (_Instance == null) _Instance = new ConcurrentDictionary<string, AlarmT>(); |
|
|
|
// if (!_Instance.ContainsKey(name)) _Instance.TryAdd(name, new AlarmT()); |
|
|
|
// return _Instance[name]; |
|
|
|
//} |
|
|
|
//private AlarmHelper() { } |
|
|
|
|
|
|
|
|
|
|
|
public static ObservableCollection<Alarm> Alarms { get; set; } = new ObservableCollection<Alarm>(); |
|
|
|
public static List<Alarm> HistoryAlarms { get; set; } = new List<Alarm>(); |
|
|
|
static ConcurrentDictionary<string, bool> flagbit = new ConcurrentDictionary<string, bool>(); |
|
|
|