blob: ce14fa68447d93597c860788929db30ef71aabba (
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Tango.Core;
using Tango.FSE.BL.Connectivity;
using Tango.FSE.Common.Diagnostics;
using Tango.PMR.Integration;
using Tango.Settings;
namespace Tango.FSE.Common
{
public class FSESettings : SettingsBase
{
public enum WorkingEnvironment
{
Remote,
Local
}
public class MachineConnectionSettings
{
public String SerialNumber { get; set; }
public ExternalBridgeLoginIntent Intent { get; set; }
public bool RequireSafetyLevelOperations { get; set; }
public String Password { get; set; }
public bool AutoReconnection { get; set; }
}
public class StatisticsStreamingConfiguration : ExtendedObject
{
private bool _enable;
public bool Enable
{
get { return _enable; }
set { _enable = value; if (!value) EnableCsvReports = false; RaisePropertyChanged(nameof(EnableCsvReports)); }
}
public bool EnableCsvReports { get; set; }
public String CsvReportsFolder { get; set; }
}
/// <summary>
/// Gets or sets the working environment.
/// </summary>
public WorkingEnvironment Environment { get; set; }
/// <summary>
/// Gets or sets the last login email.
/// </summary>
public String LastLoginEmail { get; set; }
/// <summary>
/// Gets or sets the last login password.
/// </summary>
public String LastLoginPassword { get; set; }
/// <summary>
/// Gets or sets the last environment identifier.
/// </summary>
public String LastEnvironmentID { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to save the user credentials.
/// </summary>
public bool RememberMe { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to force the application version update.
/// </summary>
public bool ForceVersionUpdate { get; set; }
/// <summary>
/// Gets or sets the last selected machine on the connection pane.
/// </summary>
public String LastSelectedMachine { get; set; }
/// <summary>
/// Gets or sets the last virtualized machine serial number.
/// </summary>
public String LastVirtualizedMachineSerialNumber { get; set; }
/// <summary>
/// Gets or sets the external bridge SignalR hub.
/// </summary>
public String ExternalBridgeSignalRHub { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to enable external bridge scanning via SignalR.
/// </summary>
public bool EnableExternalBridgeSignalR { get; set; }
/// <summary>
/// Gets or sets the diagnostics throttling mode.
/// </summary>
public DiagnosticsThrottlingMode DiagnosticsThrottlingMode { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to enable the machine emulator.
/// </summary>
public bool EnableMachineEmulator { get; set; }
/// <summary>
/// Gets or sets the height of the machine connection pane USB area.
/// </summary>
public GridLength MachineConnectionUsbHeight { get; set; }
/// <summary>
/// Gets or sets the height of the machine connection pane WIFI area.
/// </summary>
public GridLength MachineConnectionWifiHeight { get; set; }
/// <summary>
/// Gets or sets the height of the machine connection pane SignalR area.
/// </summary>
public GridLength MachineConnectionSignalRHeight { get; set; }
/// <summary>
/// Gets or sets the stored machine passwords.
/// </summary>
public List<MachineConnectionSettings> StoredMachinesConnectionSettings { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to maximize the application after login.
/// </summary>
public bool WindowMaximizedOnStartup { get; set; }
/// <summary>
/// Gets or sets the automatic machine reconnection timeout in seconds.
/// </summary>
public int AutoMachineReconnectionTimeoutSeconds { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to perform automatic software updates check.
/// </summary>
public bool AutoCheckForUpdates { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to enable scale transform of the application window on small resolution screens.
/// </summary>
public bool EnableAdaptiveScaling { get; set; }
/// <summary>
/// Gets or sets the last issue report assigned to.
/// </summary>
public String LastReportAssignedTo { get; set; }
/// <summary>
/// Gets or sets the last report area.
/// </summary>
public String LastReportArea { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the application has terminated unexpectedly.
/// </summary>
public bool TerminatedExpectedly { get; set; }
/// <summary>
/// Gets or sets the file association service port.
/// </summary>
public int FileAssociationServicePort { get; set; }
/// <summary>
/// Gets or sets the connectivity verification method.
/// </summary>
public ConnectivityVerificationMethod ConnectivityVerificationMethod { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to force the external bridge protocol configuration event when there is an error with the request.
/// </summary>
public bool ForceExternalBridgeProtocolConfiguration { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to enable hot folder for uploading jobs to the remote machine.
/// </summary>
public bool EnableHotFolder { get; set; }
/// <summary>
/// Gets or sets the hot folder path (null means default path on %appdata%).
/// </summary>
public String HotFolderPath { get; set; }
/// <summary>
/// Gets or sets the statistics streaming configuration.
/// </summary>
/// <value>
public StatisticsStreamingConfiguration StatisticsStreamingConfig { get; set; }
/// <summary>
/// Gets or sets the last type of the connected machine.
/// </summary>
public int LastConnectedMachineType { get; set; }
/// <summary>
/// Gets or sets the last job upload thread unique identifier.
/// </summary>
public String LastJobUploadThreadGuid { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="FSESettings"/> class.
/// </summary>
public FSESettings()
{
Environment = WorkingEnvironment.Remote;
ExternalBridgeSignalRHub = "ExternalBridgeHub";
EnableExternalBridgeSignalR = true;
DiagnosticsThrottlingMode = DiagnosticsThrottlingMode.Delayed;
MachineConnectionUsbHeight = new GridLength(1, GridUnitType.Star);
MachineConnectionWifiHeight = new GridLength(1, GridUnitType.Star);
MachineConnectionSignalRHeight = new GridLength(1, GridUnitType.Star);
StoredMachinesConnectionSettings = new List<MachineConnectionSettings>();
AutoMachineReconnectionTimeoutSeconds = 10;
AutoCheckForUpdates = true;
EnableAdaptiveScaling = true;
TerminatedExpectedly = true;
FileAssociationServicePort = 1800;
ConnectivityVerificationMethod = ConnectivityVerificationMethod.Windows;
ForceExternalBridgeProtocolConfiguration = true;
EnableHotFolder = true;
StatisticsStreamingConfig = new StatisticsStreamingConfiguration();
}
}
}
|