| | |
| | | else if (titleId == StringId.Electric) |
| | | { |
| | | functionList.AddRange(FunctionList.List.GetElectricals()); |
| | | functionList.Add(new Function { spk = SPK.ElectricalTvHisense, name = "海信电视1",sid="123456789"}); |
| | | functionList.Add(new Function { spk = SPK.ElectricalTvHisense, name = "海信电视2", sid = "1234567890" }); |
| | | } |
| | | else if (titleId == StringId.EnvironmentalScience) |
| | | { |
| | |
| | | functionListView.AddChidren(functionDiv); |
| | | |
| | | } |
| | | else if (function.spk == SPK.ElectricalTvHisense) |
| | | { |
| | | Action deviceDelAction = () => |
| | | { |
| | | //删除设备成功后更新UI |
| | | if (functionListView==null) { |
| | | return; |
| | | } |
| | | functionListView.RemoveAll(); |
| | | showList.Remove(function);//先移除 |
| | | ShowFunctionRow(showList,isAppend); |
| | | |
| | | }; |
| | | var functionDiv = new FunctionControlZone(function, deviceDelAction) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(96), |
| | | Radius = (uint)Application.GetMinRealAverage(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 1, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Tag = function.spk + function.sid |
| | | }; |
| | | functionDiv.LoadFunctionDiv(); |
| | | functionDiv.OrderEvent = OrderEvent; |
| | | functionListView.AddChidren(functionDiv); |
| | | } |
| | | else |
| | | { |
| | | var functionDiv = new FunctionControlZone(function,null) |
| | | var functionDiv = new FunctionControlZone(function, null) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |