| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System.Collections.ObjectModel;
- namespace DataLogModule.ViewModels;
- internal partial class DLOperationViewModel : ObservableObject
- {
- public DLOperationViewModel()
- {
- this.Logs = [];
-
- for (int i = 0; i < 3; i++)
- {
- OperationLog log = new()
- {
- AlarmType=(AlarmTypeEnum)i,
- Time = DateTime.Now,
- System="System",
- Description=$"Test Log {i}"
- };
- this.Logs.Add(log);
- }
- }
- [ObservableProperty]
- private ObservableCollection<OperationLog> _Logs;
- }
- public class OperationLog
- {
- public AlarmTypeEnum AlarmType { get; set; }
- public DateTime Time { get; set; }
- public string? System { get; set; }
- public string? Description { get; set; }
- }
- public enum AlarmTypeEnum
- {
- Info,
- Warning,
- Alarm
- }
|