old mode 100644
new mode 100755
| | |
| | | { |
| | | |
| | | #region 最上面的布局代码 |
| | | UserView.HomePage.Instance.ScrollEnabled = false;//锁住左滑 |
| | | TopView view = new TopView(); |
| | | this.AddChidren(view.TopRowView()); |
| | | if (Common.Logic.CurrentLogic.LogicId != 0) |
| | |
| | | } |
| | | view.clickBtn.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | |
| | | //UserView.HomePage.Instance.ScrollEnabled = true;//恢复左滑 |
| | | RemoveFromParent(); |
| | | }; |
| | | #endregion |
| | |
| | | var middle = new VerticalScrolViewLayout |
| | | { |
| | | Y = view.topRowLayout.Bottom, |
| | | Height = Application.GetRealHeight(1920 - 184 - 180), |
| | | Height = Application.GetRealHeight(Method.H - 184 - 180), |
| | | BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | }; |
| | | this.AddChidren(middle); |
| | |
| | | { |
| | | SelectedDeviceView selecteddevice = new SelectedDeviceView(); |
| | | selecteddevice.Show(middle); |
| | | selecteddevice.stateRow.AddRightView(selecteddevice.edit); |
| | | selecteddevice.stateRow.AddRightView(selecteddevice.del); |
| | | var Type = int.Parse(ListConditions[i]["Type"]); |
| | | var conditions = ListConditions[i]; |
| | | switch (Type) |
| | |
| | | { |
| | | var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]); |
| | | selecteddevice.deviceNameBtn.Visible = true; |
| | | selecteddevice.deviceNameBtn.Text = deviceinof.DeviceEpointName; |
| | | selecteddevice.deviceNameBtn.Text = LocalDevice.Current.GetDeviceEpointName(deviceinof); |
| | | selecteddevice.regionNameBtn.Visible = true; |
| | | Method.RoomNmae(selecteddevice.regionNameBtn, deviceinof); |
| | | selecteddevice.iconBtn.UnSelectedImagePath ="ZigeeLogic/sensor13.png"; |
| | |
| | | { |
| | | case 13: |
| | | { |
| | | if (intvalue == "1") |
| | | { |
| | | selecteddevice.selecetddevicestateBtn.TextID = MyInternationalizationString.someone; |
| | | } |
| | | else |
| | | |
| | | if (conditions.ContainsKey("IgnoreTime")) |
| | | { |
| | | int minute = int.Parse(conditions["IgnoreTime"]) / 60; |
| | | int second = int.Parse(conditions["IgnoreTime"]) % 60; |
| | |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | selecteddevice.selecetddevicestateBtn.TextID = MyInternationalizationString.someone; |
| | | } |
| | | |
| | | } |
| | | break; |
| | | } |
| | |
| | | } |
| | | break; |
| | | } |
| | | |
| | | |
| | | ///编辑 |
| | | selecteddevice.edit.Tag = i.ToString(); |
| | | selecteddevice.edit.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]); |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; |
| | | this.AddChidren(flMain); |
| | | CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_mould"); |
| | | CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_mould", int.Parse(selecteddevice.edit.Tag.ToString())); |
| | | |
| | | }; |
| | | ///删除控件 |
| | |
| | | alert.ConfirmClickEvent += () => |
| | | { |
| | | Common.Logic.CurrentLogic.Conditions.Remove(conditions); |
| | | var templatePage = new TemplatePage(); |
| | | UserView.HomePage.Instance.AddChidren(templatePage); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | templatePage.Show(); |
| | | selecteddevice.selecetdFrameLayout.RemoveFromParent(); |
| | | //var templatePage = new TemplatePage(); |
| | | //UserView.HomePage.Instance.AddChidren(templatePage); |
| | | //UserView.HomePage.Instance.PageIndex += 1; |
| | | //templatePage.Show(); |
| | | }; |
| | | }; |
| | | } |
| | |
| | | |
| | | SelectedDeviceView actiondevice = new SelectedDeviceView(); |
| | | actiondevice.Show(middle); |
| | | actiondevice.stateRow.AddRightView(actiondevice.edit); |
| | | actiondevice.stateRow.AddRightView(actiondevice.del); |
| | | var linkType = int.Parse(ListActions[i]["LinkType"].ToString()); |
| | | var actions = ListActions[i]; |
| | | |
| | |
| | | { |
| | | var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); |
| | | actiondevice.deviceNameBtn.Visible = true; |
| | | actiondevice.deviceNameBtn.Text = deviceinof.DeviceEpointName; |
| | | actiondevice.deviceNameBtn.Text = LocalDevice.Current.GetDeviceEpointName(deviceinof); |
| | | actiondevice.regionNameBtn.Visible = true; |
| | | Method.RoomNmae(actiondevice.regionNameBtn, deviceinof); |
| | | switch (deviceinof.Type) |
| | |
| | | break; |
| | | } |
| | | ///编辑 |
| | | |
| | | actiondevice.edit.Tag = i; |
| | | actiondevice.edit.MouseUpEventHandler += (sender, e) => { |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; |
| | | this.AddChidren(flMain); |
| | | var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); |
| | | CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_mould"); |
| | | CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_mould",int.Parse(actiondevice.edit.Tag.ToString())); |
| | | }; |
| | | ///删除控件 |
| | | actiondevice.del.MouseUpEventHandler += (sender, e) => |
| | |
| | | alert.ConfirmClickEvent += () => |
| | | { |
| | | Common.Logic.CurrentLogic.Actions.Remove(actions); |
| | | var templatePage = new TemplatePage(); |
| | | UserView.HomePage.Instance.AddChidren(templatePage); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | templatePage.Show(); |
| | | actiondevice.selecetdFrameLayout.RemoveFromParent(); |
| | | //var templatePage = new TemplatePage(); |
| | | //UserView.HomePage.Instance.AddChidren(templatePage); |
| | | //UserView.HomePage.Instance.PageIndex += 1; |
| | | //templatePage.Show(); |
| | | }; |
| | | }; |
| | | |
| | |
| | | |
| | | #region -----每天 设置周期----- |
| | | |
| | | var fraline1 = new FrameLayout |
| | | var fraHeight = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(30), |
| | | }; |
| | | middle.AddChidren(fraline1); |
| | | middle.AddChidren(fraHeight); |
| | | |
| | | |
| | | LogicView.Addview weekview = new LogicView.Addview(); |