| | |
| | | /// <param name="Yes"></param> |
| | | public void Show(bool Yes) |
| | | { |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | #region View布局代码 |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | TopView view = new TopView(); |
| | | this.AddChidren(view.TopRowView()); |
| | | |
| | |
| | | |
| | | view.clickBtn.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | // UserView.HomePage.Instance.ScrollEnabled = true;//恢复左滑 |
| | | UserView.HomePage.Instance.ScrollEnabled = true;//恢复左滑 |
| | | RemoveFromParent(); |
| | | }; |
| | | var middle = new VerticalScrolViewLayout |
| | |
| | | //S-one门锁特殊,不能再次编辑; |
| | | actiondevice.stateRow.AddRightView(actiondevice.edit); |
| | | } |
| | | |
| | | |
| | | var linkType = int.Parse(Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString()); |
| | | var actions = Common.Logic.CurrentLogic.Actions[i]; |
| | | |
| | | switch (linkType) |
| | | { |
| | | case 8: |
| | | { |
| | | |
| | | var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); |
| | | {
|
| | | //S-one门锁特殊(Mac是唯一的识别)
|
| | | ///如果不这样查找,分类-自动化进来查看会存在问题 |
| | | var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return obj.DeviceAddr == actions["DeviceAddr"].ToString(); });
|
| | | if (deviceinof == null) |
| | | { |
| | | deviceinof = new CommonDevice(); |
| | |
| | | break; |
| | | |
| | | } |
| | | |
| | | ///编辑 |
| | | actiondevice.edit.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | switch (linkType) |
| | | { |
| | | case 8: |
| | | { |
| | | var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); |
| | | {
|
| | | //S-one门锁特殊(Mac是唯一的识别)
|
| | | ///如果不这样查找,分类-自动化进来查看会存在问题 |
| | | var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return obj.DeviceAddr == actions["DeviceAddr"].ToString(); }); |
| | | if (deviceinof == null) |
| | | { |
| | | deviceinof = new CommonDevice(); |
| | |
| | | return; |
| | | } |
| | | var name = logicTextBox.Text.Trim(); |
| | | Method.SaveLogic(IfString._Logic, name, IfString.Tag, Common.Logic.CurrentLogic); |
| | | Method.SaveLogic(IfString._SoneLogic, name, IfString.Tag, Common.Logic.CurrentLogic); |
| | | }; |
| | | |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | |
| | | |
| | | }; |
| | | |
| | | foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions) |
| | | if (button.Text == Language.StringByID(MyInternationalizationString.logicopen)) |
| | | { |
| | | if (deviceinfo["LinkType"].ToString() == "8") |
| | | { |
| | | if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString()) |
| | | { |
| | | if (deviceinfo["PassData"].ToString() == "055704010112") |
| | | {//开启 |
| | | SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicopen); |
| | | openView.selectedIconBtn.Visible = true; |
| | | closeView.selectedIconBtn.Visible = false; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | } |
| | | else |
| | | {//关闭 |
| | | SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicclose); |
| | | openView.selectedIconBtn.Visible = false; |
| | | closeView.selectedIconBtn.Visible = true; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | //开启 |
| | | SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicopen); |
| | | openView.selectedIconBtn.Visible = true; |
| | | closeView.selectedIconBtn.Visible = false; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | else { |
| | | //关闭 |
| | | SelectedDeviceStatus = Language.StringByID(MyInternationalizationString.logicclose); |
| | | openView.selectedIconBtn.Visible = false; |
| | | closeView.selectedIconBtn.Visible = true; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | } |
| | | |
| | | } |
| | | break; |