| | |
| | | /// </summary> |
| | | void LoadInfo(Function sensor) |
| | | { |
| | | var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); |
| | | var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); |
| | | List<uint> levelColorList = new List<uint>(); |
| | | List<int> levelTextList = new List<int>(); |
| | | List<string> levelText = new List<string>(); |
| | | var configs = sensor.GetAttrKeyConfigs(sensor.SpkClassification); |
| | | |
| | | |
| | | int i = 0; |
| | | foreach(var info in configs) |
| | | { |
| | | foreach(var config in info.configs) |
| | | { |
| | | var color = Convert.ToUInt32(config.color,16); |
| | | var text = config.desc; |
| | | levelColorList.Add(color); |
| | | levelText.Add(text); |
| | | levelTextList.Add(i++); |
| | | } |
| | | } |
| | | if (levelColorList.Count == 0) |
| | | { |
| | | levelColorList = sensorTemp.GetLevelColorList(sensor.spk); |
| | | levelTextList = sensorTemp.GetLevelTextList(sensor.spk); |
| | | foreach(var iii in levelTextList) |
| | | { |
| | | levelText.Add(Language.StringByID(iii)); |
| | | } |
| | | } |
| | | Dialog dialog = new Dialog(); |
| | | |
| | | FrameLayout dialogBodyView = new FrameLayout(); |
| | |
| | | IsBold = true, |
| | | TextID = StringId.ColorValue, |
| | | }); |
| | | for (int index = 0; index < levelTextList.Count; index++) |
| | | for (int index = 0; index < levelText.Count; index++) |
| | | { |
| | | infoView.AddChidren(new Button() |
| | | { |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsBold = true, |
| | | TextID = levelTextList[index] |
| | | Text = levelText[index] |
| | | }); |
| | | |
| | | subInfoView.AddChidren(new Button() |