aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
blob: b1bc3faad66c6973495a12458c6962df9a4b8d49 (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
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using Tango.Logging;
using Tango.PMR.Printing;
using Tango.Settings;
using Tango.Web;

namespace Tango.PPC.Common
{
    /// <summary>
    /// Represents the main PPC settings.
    /// </summary>
    /// <seealso cref="Tango.Settings.SettingsBase" />
    public class PPCSettings : SettingsBase
    {
        /// <summary>
        /// Gets or sets the logging categories.
        /// </summary>
        public List<LogCategory> LoggingCategories { get; set; }

        /// <summary>
        /// Gets or sets the state of the application.
        /// </summary>
        public ApplicationStates ApplicationState { get; set; }

        /// <summary>
        /// Gets or sets the machine scanning timeout seconds.
        /// </summary>
        public int MachineScanningTimeoutSeconds { get; set; }

        /// <summary>
        /// Gets or sets the name of the WiFi network to automatically connect to when the application starts.
        /// </summary>
        public String AutoConnectWiFiName { get; set; }

        /// <summary>
        /// Gets or sets the password of the WiFi network to automatically connect to when the application starts.
        /// </summary>
        public String AutoConnectWiFiPassword { get; set; }

        /// <summary>
        /// Gets or sets the embedded COM port if not specified will use auto scanning.
        /// </summary>
        public String EmbeddedComPort { get; set; }

        /// <summary>
        /// Gets or sets the embedded device scanning hint.
        /// </summary>
        public String EmbeddedDeviceHint { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [enable external bridge].
        /// </summary>
        public bool EnableExternalBridge { get; set; }

        /// <summary>
        /// Gets or sets the external bridge password.
        /// </summary>
        public String ExternalBridgePassword { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [enable hot spot].
        /// </summary>
        public bool EnableHotSpot { get; set; }

        /// <summary>
        /// Gets or sets the hot spot password.
        /// </summary>
        public String HotSpotPassword { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to enable team viewer service.
        /// </summary>
        public bool EnableRemoteAssistance { get; set; }

        /// <summary>
        /// Gets or sets the deployment slot.
        /// </summary>
        public DeploymentSlot DeploymentSlot { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to enable the watch dog process.
        /// </summary>
        public bool EnableWatchDog { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to enable the technician mode when the application starts.
        /// </summary>
        public bool EnableTechnicianModeByDefault { get; set; }

        /// <summary>
        /// Gets or sets the job upload strategy.
        /// </summary>
        public JobUploadStrategy JobUploadStrategy { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to enable gradient generation.
        /// </summary>
        public bool EnableGradientGeneration { get; set; }

        /// <summary>
        /// Gets or sets the gradient generation resolution.
        /// </summary>
        public int GradientGenerationResolution { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to enable the application lock screen.
        /// </summary>
        public bool EnableLockScreen { get; set; }

        /// <summary>
        /// Gets or sets the lock screen timeout.
        /// </summary>
        public TimeSpan LockScreenTimeout { get; set; }

        /// <summary>
        /// Gets or sets the lock screen password.
        /// </summary>
        public String LockScreenPassword { get; set; }

        /// <summary>
        /// Gets or sets the enable emergency notifications.
        /// </summary>
        public bool EnableEmergencyNotifications { get; set; }

        /// <summary>
        /// Gets or sets the emergency COM port.
        /// </summary>
        public String EmergencyComPort { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to enable the job liquid quantity validation.
        /// </summary>
        public bool EnableJobLiquidQuantityValidation { get; set; }

        /// <summary>
        /// Gets the machine service address.
        /// </summary>
        /// <returns></returns>
        public String GetMachineServiceAddress()
        {
            return DeploymentSlot.ToAddress();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PPCSettings"/> class.
        /// </summary>
        public PPCSettings()
        {
            JobUploadStrategy = JobUploadStrategy.JobDescriptionFile;
            EnableGradientGeneration = true;
            GradientGenerationResolution = 20;
            MachineScanningTimeoutSeconds = 20;
            LoggingCategories = new List<LogCategory>();
            EmbeddedComPort = "COM10";
            EmbeddedDeviceHint = "Tango USB Serial Port";
            ExternalBridgePassword = "Aa123456";
            HotSpotPassword = "Aa123456";
            LockScreenTimeout = TimeSpan.FromMinutes(10);
            LockScreenPassword = "1111";
            DeploymentSlot = DeploymentSlot.TEST;
            EnableWatchDog = true;
            EnableEmergencyNotifications = true;
            EmergencyComPort = "COM2";
            EnableJobLiquidQuantityValidation = true;
        }
    }
}