aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
blob: 7b617ddaac01354d04b3bd6ebbed49a8245ef29b (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
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using Tango.Logging;
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 name of a WiFi network to automatically connect to when the application starts.
        /// </summary>
        public String AutoConnectWiFiName { 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 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 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()
        {
            MachineScanningTimeoutSeconds = 20;
            LoggingCategories = new List<LogCategory>();
            EmbeddedComPort = null;
            ExternalBridgePassword = "Aa123456";
            HotSpotPassword = "Aa123456";
            DeploymentSlot = DeploymentSlot.TEST;
        }
    }
}