First working version
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
<xs:all>
|
||||
<xs:element name="TranspColor" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="RenderingMethod" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="RunningOnSecondaryScreen" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="RunningOnSecondaryScreen" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="DeveloperMode" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<Client>
|
||||
<TranspColor>#FF00FF</TranspColor>
|
||||
<RenderingMethod>GPU</RenderingMethod> <!-- GPU/CPU -->
|
||||
<RunningOnSecondaryScreen>false</RunningOnSecondaryScreen>
|
||||
<RunningOnSecondaryScreen>false</RunningOnSecondaryScreen>
|
||||
<DeveloperMode>true</DeveloperMode>
|
||||
</Client>
|
||||
<Connection>
|
||||
<Url>http://localhost:9000/index.html</Url>
|
||||
|
||||
@@ -39,7 +39,8 @@ namespace Client.Config
|
||||
{
|
||||
TranspColor = ValidateTranspColor(x.Element("TranspColor").Value),
|
||||
RenderingMethod = ValidateRendering(x.Element("RenderingMethod").Value),
|
||||
RunningOnSecondaryScreen = ValidateSecScreen(x.Element("RunningOnSecondaryScreen").Value)
|
||||
RunningOnSecondaryScreen = ValidateSecScreen(x.Element("RunningOnSecondaryScreen").Value),
|
||||
DeveloperMode = ValidateSecScreen(x.Element("DeveloperMode").Value)
|
||||
}).FirstOrDefault();
|
||||
|
||||
Config.ConnectionConfig = xmlConfigFile
|
||||
@@ -151,6 +152,18 @@ namespace Client.Config
|
||||
|
||||
|
||||
|
||||
private static bool ValidateDeveloperMode(string value)
|
||||
{
|
||||
Boolean DeveloperMode;
|
||||
if (Boolean.TryParse(value, out DeveloperMode))
|
||||
return DeveloperMode;
|
||||
else
|
||||
throw new Exception(@"Configuration Error: ""Client - DeveloperMode"" is not a valid Boolean Type");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static Boolean ValidateOpenHmi(String value)
|
||||
{
|
||||
String Nc = value.ToUpper();
|
||||
|
||||
@@ -13,5 +13,6 @@ namespace Client.Config.SubModels
|
||||
public Color TranspColor { get; set; }
|
||||
public Rendering RenderingMethod { get; set; }
|
||||
public Boolean RunningOnSecondaryScreen { get; set; }
|
||||
public Boolean DeveloperMode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user