blob: 080d44ceb9b3bc3404b748c728aca17ab8ded391 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Enumerations;
using Tango.Core;
namespace Tango.FSE.Insights.Config
{
public class AnnotationsConfiguration : ExtendedObject
{
private bool _displayConnectionMarkers;
public bool DisplayConnectionMarkers
{
get { return _displayConnectionMarkers; }
set { _displayConnectionMarkers = value; RaisePropertyChangedAuto(); }
}
private bool _displayEvents;
public bool DisplayEvents
{
get { return _displayEvents; }
set { _displayEvents = value; RaisePropertyChangedAuto(); }
}
private bool _displayJob;
public bool DisplayJobs
{
get { return _displayJob; }
set { _displayJob = value; RaisePropertyChangedAuto(); }
}
private bool _displayStatuses;
public bool DisplayStatuses
{
get { return _displayStatuses; }
set { _displayStatuses = value; RaisePropertyChangedAuto(); }
}
private bool _displayUpdates;
public bool DisplayUpdates
{
get { return _displayUpdates; }
set { _displayUpdates = value; RaisePropertyChangedAuto(); }
}
private bool _displayBugReports;
public bool DisplayBugReports
{
get { return _displayBugReports; }
set { _displayBugReports = value; RaisePropertyChangedAuto(); }
}
private bool _displayApplicationExceptions;
public bool DisplayApplicationExceptions
{
get { return _displayApplicationExceptions; }
set { _displayApplicationExceptions = value; RaisePropertyChangedAuto(); }
}
private ObservableCollection<EventTypeCategories> _eventsCategories;
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace)]
public ObservableCollection<EventTypeCategories> EventsCategories
{
get { return _eventsCategories; }
set { _eventsCategories = value; RaisePropertyChangedAuto(); }
}
private ObservableCollection<EventTypeGroups> _eventsGroups;
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace)]
public ObservableCollection<EventTypeGroups> EventsGroups
{
get { return _eventsGroups; }
set { _eventsGroups = value; RaisePropertyChangedAuto(); }
}
public static AnnotationsConfiguration CreateDefault()
{
AnnotationsConfiguration config = new AnnotationsConfiguration();
config.EventsCategories.Add(EventTypeCategories.Critical);
config.EventsCategories.Add(EventTypeCategories.Error);
config.EventsCategories.Add(EventTypeCategories.Info);
//config.EventsGroups.Add(EventTypeGroups.Jobs); //Job are artificially from a check box.
config.EventsGroups.Add(EventTypeGroups.Application);
config.EventsGroups.Add(EventTypeGroups.Dispensers);
config.EventsGroups.Add(EventTypeGroups.Dryer);
config.EventsGroups.Add(EventTypeGroups.DyeingHead);
config.EventsGroups.Add(EventTypeGroups.ElectricalCabinet);
config.EventsGroups.Add(EventTypeGroups.GeneralHardware);
config.EventsGroups.Add(EventTypeGroups.InkDeliverySystem);
config.EventsGroups.Add(EventTypeGroups.InkFillingSystem);
config.EventsGroups.Add(EventTypeGroups.Mixer);
config.EventsGroups.Add(EventTypeGroups.ThreadFeedingSystem);
config.EventsGroups.Add(EventTypeGroups.WasteHandlingSystem);
return config;
}
public AnnotationsConfiguration()
{
DisplayConnectionMarkers = true;
DisplayEvents = true;
DisplayJobs = true;
DisplayStatuses = true;
DisplayUpdates = true;
DisplayBugReports = true;
DisplayApplicationExceptions = true;
EventsCategories = new ObservableCollection<EventTypeCategories>();
EventsGroups = new ObservableCollection<EventTypeGroups>();
}
}
}
|