| | |
| | | /// </summary> |
| | | private Button btnDelay =null; |
| | | /// <summary> |
| | | /// 当前设备 |
| | | /// </summary> |
| | | private Function device; |
| | | /// <summary> |
| | | /// 定义一个记录选中设备状态列表; |
| | | /// </summary> |
| | | private List<Dictionary<string, string>> dicSateteList = new List<Dictionary<string, string>>(); |
| | |
| | | public void Show(Entity.Function device, int index, bool edit) |
| | | { |
| | | #region 界面布局 |
| | | this.device = device; |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | LogicView.TopView topView = new LogicView.TopView(); |
| | | this.AddChidren(topView.FLayoutView()); |
| | |
| | | #region 界面 |
| | | ///总控开关 |
| | | LogicView.FunTypeView view1 = new LogicView.FunTypeView(); |
| | | view1.btnText.TextID = StringId.zongkogkaiguan; |
| | | view1.btnState.Name = "总控开关"; |
| | | view1.btnText.TextID = StringId.switchLogic; |
| | | //view1.btnState.Name = "总控开关"; |
| | | fLayout.AddChidren(view1.FLayoutView()); |
| | | ///设备延时iewv |
| | | DelayView(fLayout, view1.frameLayout.Bottom); |
| | |
| | | }; |
| | | |
| | | break; |
| | | //开关灯光 |
| | | //开关灯光 |
| | | case SPK.OtherCommon: |
| | | case SPK.AirSwitch: |
| | | case SPK.LightSwitch: |
| | | case SPK.ElectricSocket: |
| | |
| | | } |
| | | break; |
| | | } |
| | | |
| | | //界面显示选中值 |
| | | button.TextID = id; |
| | | selectedState = device.spk + "_" + value; |
| | |
| | | { |
| | | case SPK.PanelSocket: |
| | | { |
| | | if (button.Name == "总控开关") |
| | | { |
| | | key = "on_off_master"; |
| | | } |
| | | //if (button.Name == "总控开关") |
| | | //{ |
| | | // key = "on_off_master"; |
| | | //} |
| | | } |
| | | break; |
| | | case SPK.GroupControl: |
| | |
| | | if (button.Name == "colorful") |
| | | { |
| | | key = "colorful"; |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | if ("on" == value) |
| | | { |
| | | key = "wol"; |
| | | } |
| | | |
| | | } |
| | |
| | | /// <returns></returns> |
| | | private void AddDictionaryList(string key, Dictionary<string, string> dictionary) |
| | | { |
| | | |
| | | if (this.device.spk == SPK.ElectricalTvHisense) |
| | | { |
| | | //特殊处理 |
| | | if (key == "on_off") |
| | | { |
| | | key = "wol"; |
| | | } |
| | | else if (key == "wol") |
| | | { |
| | | key = "on_off"; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | int indexValue = -1; |
| | | for (int i = 0; i < dicSateteList.Count; i++) |
| | | { |
| | |
| | | dicSateteList.Add(dictionary); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加目标 |
| | | /// </summary> |