Added client SCM/CMS options

This commit is contained in:
Nicola Carminati
2019-04-04 18:33:44 +02:00
parent a681fa31b1
commit 830221b178
39 changed files with 324 additions and 179 deletions
+11 -1
View File
@@ -39,7 +39,8 @@ namespace Client.Config
RenderingMethod = ValidateRendering(x.Element("RenderingMethod").Value),
RunningOnSecondaryScreen = ValidateSecScreen(x.Element("RunningOnSecondaryScreen").Value),
ShowVirtualKeyboard = ValidateVirtualKeyboard(x.Element("ShowVirtualKeyboard").Value),
DeveloperMode = ValidateSecScreen(x.Element("DeveloperMode").Value)
DeveloperMode = ValidateDeveloperMode(x.Element("DeveloperMode").Value),
IsSCM = ValidateIsSCM(x.Element("IsSCM").Value)
}).FirstOrDefault();
Config.ConnectionConfig = xmlConfigFile
@@ -150,6 +151,15 @@ namespace Client.Config
throw new Exception(@"Configuration Error: ""Client - RunningOnSecondaryScreen"" is not a valid Boolean Type");
}
private static bool ValidateIsSCM(string value)
{
Boolean IsSCM;
if (Boolean.TryParse(value, out IsSCM))
return IsSCM;
else
throw new Exception(@"Configuration Error: ""Client - IsSCM"" is not a valid Boolean Type");
}