Added new tool configuration: customizable tools types

This commit is contained in:
Lucio Maranta
2019-12-10 16:32:44 +01:00
parent 61987e4e20
commit 665c8cfa54
10 changed files with 923 additions and 7 deletions
+14
View File
@@ -658,6 +658,20 @@ namespace Step.Config
),
})
.ToList();
ToolManagerConfig.ToolTypes = xmlConfigFile
.Root
.Descendants("toolTypes")
.Elements()
.Select(x => new ToolTypeConfigModel()
{
Id = Convert.ToInt32(x.Element("id").Value),
Disabled = Convert.ToBoolean(x.Element("disabled").Value),
LocalizedNames = x.Element("localizedNames").Elements().ToDictionary( // Read localized names and convert into a dictionary
y => y.Attribute("langKey").Value, y => y.Value
),
})
.ToList();
}