| | |
| | | fLayout.AddChidren(view1.FLayoutView()); |
| | | view1.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | identifier = "door_call_cloud_event"; |
| | | DeviceView(device, view1.btnState, StringId.shi, StringId.offLogic, 1); |
| | | this.identifier = "door_call_cloud_event"; |
| | | this.DeviceView(device, view1.btnState, StringId.shi, StringId.offLogic, 1); |
| | | }; |
| | | |
| | | LogicView.FunTypeView view2 = new LogicView.FunTypeView(); |
| | |
| | | fLayout.AddChidren(view2.FLayoutView()); |
| | | view2.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | identifier = "door_pedestrian_records"; |
| | | this.identifier = "door_pedestrian_records"; |
| | | this.FaceAction(this, device, view2.btnState); |
| | | }; |
| | | |
| | |
| | | } |
| | | if (edit) |
| | | { |
| | | GetEditState(device, index, view1.btnState, view2.btnState, null, null); |
| | | this.GetEditState(device, index, view1.btnState, view2.btnState, null, null); |
| | | } |
| | | } |
| | | break; |
| | | //大华摄像头 |
| | | case SPK.IpCam_Imou: |
| | | { |
| | | LogicView.FunTypeView view = new LogicView.FunTypeView(); |
| | | view.btnText.TextID = StringId.quyuruqingaojing; |
| | | view.btnText.Name = Language.StringByID(StringId.shipintonghuahujiao); |
| | | fLayout.AddChidren(view.FLayoutView()); |
| | | view.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | this.identifier = "ipcam_region_alram_event"; |
| | | this.DeviceView(device, view.btnState, StringId.shi, StringId.offLogic, 1); |
| | | }; |
| | | |
| | | if (edit) |
| | | { |
| | | this.GetEditState(device, index, view.btnState, null, null, null); |
| | | } |
| | | } |
| | | break; |
| | | |
| | | } |
| | | #region 保存 |
| | | ///保存View |
| | |
| | | this.AddChidren(saveView.FLayoutView()); |
| | | saveView.btnClick.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | Save(device,index, edit); |
| | | this.SaveInput(device,index, edit); |
| | | }; |
| | | |
| | | #endregion |
| | |
| | | /// </summary> |
| | | /// <param name="index">索引值</param> |
| | | /// <param name="edit"></param> |
| | | private void Save(Entity.Function device,int index, bool edit) |
| | | private void SaveInput(Entity.Function device,int index, bool edit) |
| | | { |
| | | |
| | | if (selectedState != "unknown") |
| | |
| | | inputDevice.condition = new List<Dictionary<string, string>>(); |
| | | } |
| | | } |
| | | |
| | | |
| | | else if (device.spk == SPK.IpCam_Imou) |
| | | { |
| | | //大华摄像头 |
| | | inputDevice.condition_type = "9"; |
| | | inputDevice.identifier = this.identifier; |
| | | if (this.identifier == "ipcam_region_alram_event") |
| | | { |
| | | //condition默认[] |
| | | inputDevice.condition = new List<Dictionary<string, string>>(); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (edit) |
| | | { |
| | | //移除旧数据 |
| | |
| | | || (button.Name == Language.StringByID(StringId.diedaobaojing))) |
| | | { |
| | | //只有毫米波传感器(自研) |
| | | Save(device, mIndex, mEdit); |
| | | SaveInput(device, mIndex, mEdit); |
| | | } |
| | | else if (button.Name == Language.StringByID(StringId.shipintonghuahujiao)) { |
| | | //只有毫米波传感器(自研) |
| | | Save(device, mIndex, mEdit); |
| | | SaveInput(device, mIndex, mEdit); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | selectedState = device.spk + "_" + value; |
| | | AddDictionary(keyValue, value, data_type, comparator); |
| | | Save(device,index, edit); |
| | | SaveInput(device,index, edit); |
| | | }); |
| | | } |
| | | /// PM2.5,Co2,Tvoc设置值 |
| | |
| | | break; |
| | | } |
| | | AddDictionary(key, values, "integer", "in"); |
| | | Save(device, index, edit); |
| | | SaveInput(device, index, edit); |
| | | }); |
| | | } |
| | | /// <summary> |