User input hub comunication

Added signalR comunication -> client
Adedd new library and nhandler softkey management
This commit is contained in:
Lucio Maranta
2018-03-07 17:03:04 +01:00
parent 6332ed9732
commit 306ed6c515
12 changed files with 83 additions and 20 deletions
+5 -3
View File
@@ -78,6 +78,7 @@ namespace Step.Config
// Get SoftKeys
xmlConfigFile = GetXmlHandlerWithValidator(SOFT_KEY_CONFIG_SCHEMA_PATH, SOFT_KEY_CONFIG_PATH);
int id = 1;
SoftKeysConfig = xmlConfigFile
.Root
.Elements()
@@ -92,13 +93,14 @@ namespace Step.Config
y => y.Attribute("langKey").Value, y => y.Value
),
SubKeys = x.Element("plcKeys")?.Elements().Select(y => new SubKeysModel()
SubKeys = x.Element("plcKeys")?.Elements().Select(y => new SubKeysModel() // Populate subkeys if exist
{
Id = id++,
PlcId = Convert.ToInt32(y.Attribute("plcId").Value),
Text = y.Value
}).ToList(),
Type = GetSoftKeyType(x.Name.ToString())
Type = GetSoftKeyType(x.Name.ToString()),
OperatorConfirmationNeeded = Convert.ToBoolean(x.Element("operatorConfirmationNeeded").Value)
})
.ToList();
}
@@ -128,7 +130,7 @@ namespace Step.Config
switch (type)
{
case "procedure": return SOFTKEY_TYPE.PROCEDURE;
case "group": return SOFTKEY_TYPE.MULTIPLE;
case "group": return SOFTKEY_TYPE.GROUP;
default: return SOFTKEY_TYPE.SOFTKEY;
}
}