old mode 100755
new mode 100644
| | |
| | | completeView.Btntitle.Text = common.DeviceEpointName; |
| | | EventHandler<MouseEventArgs> clickcancel = (sender, e) => |
| | | { |
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | if (!edit) |
| | | { |
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | } |
| | | flMain.RemoveFromParent(); |
| | | }; |
| | | flMain.MouseUpEventHandler += clickcancel; |
| | |
| | | openView.titleBtn.TextID = MyInternationalizationString.open; |
| | | |
| | | mFunView closeView = new mFunView(); |
| | | closeView.frameLayout.Y = openView.frameLayout.Bottom; |
| | | closeView.frameLayout.Y = Application.GetRealHeight(140 + 20+160); |
| | | // closeView.frameLayout.Y = openView.frameLayout.Bottom; |
| | | //completeView.Show(l).AddChidren(closeView.Show()); |
| | | closeView.titleBtn.TextID = MyInternationalizationString.close; |
| | | |
| | | mFunView takebackView = new mFunView(); |
| | | takebackView.frameLayout.Y = closeView.frameLayout.Bottom; |
| | | takebackView.frameLayout.Y = Application.GetRealHeight(140+20+160+160); |
| | | // takebackView.frameLayout.Y = closeView.frameLayout.Bottom; |
| | | //completeView.Show(l).AddChidren(takebackView.Show()); |
| | | takebackView.titleBtn.TextID = MyInternationalizationString.onoff; |
| | | takebackView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | |
| | | #region -------进度条控件 |
| | | var horizontalSeekBarRowLien = new RowLayout |
| | | { |
| | | Y = openView.frameLayout.Bottom, |
| | | Width = Application.GetRealWidth(920), |
| | | //Y = openView.frameLayout.Bottom, |
| | | Width = Application.GetRealWidth(915), |
| | | Height = Application.GetRealHeight(160), |
| | | X = Application.GetRealWidth(80), |
| | | LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor, |
| | | }; |
| | | var horizontalSeekBarVol = new DiyImageSeekBar |
| | | { |
| | | Y = openView.frameLayout.Bottom, |
| | | //Y = openView.frameLayout.Bottom, |
| | | X = Application.GetRealWidth(80), |
| | | Width = Application.GetRealWidth(920), |
| | | Width = Application.GetRealWidth(915), |
| | | Height = Application.GetRealHeight(160), |
| | | IsProgressTextShow = true,//显示百分比 |
| | | IsClickable = false,//进度条是否滑动 |
| | |
| | | ThumbImagePath = "ZigeeLogic/progressbtn2.png",//进度条按钮图标 |
| | | ThumbImageHeight = Application.GetRealHeight(56),//进度条按钮图标的高度(默认正方形:宽和高一样) |
| | | ProgressTextColor = ZigbeeColor.Current.LogicBtnCancelColor, |
| | | ProgressTextSize = 12,//显示百分比字体大小 |
| | | SeekBarViewHeight = Application.GetRealHeight(10),//进度条的高度 |
| | | ProgressTextSize = 9,//显示百分比字体大小12 |
| | | SeekBarViewHeight = Application.GetRealHeight(5),//进度条的高度10 |
| | | }; |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region -------数据处理部分 |
| | |
| | | |
| | | completeView.Show(l).AddChidren(openView.Show()); |
| | | completeView.Show(l).AddChidren(closeView.Show()); |
| | | //closeView.frameLayout.Y = openView.frameLayout.Bottom; |
| | | completeView.Show(l).AddChidren(takebackView.Show()); |
| | | //takebackView.frameLayout.Y = closeView.frameLayout.Bottom; |
| | | takebackView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | #endregion |
| | | |
| | |
| | | break; |
| | | case DeviceType.DoorLock: |
| | | { |
| | | if (_if[0] == "condition") |
| | | { |
| | | flMain.RemoveFromParent(); |
| | | var memberList = new MemberList(); |
| | | UserView.HomePage.Instance.AddChidren(memberList); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | MemberList.edit = false; |
| | | memberList.Show(common); |
| | | } |
| | | else |
| | | { |
| | | completeView.Btntitle.TextID = MyInternationalizationString.openmode; |
| | | completeView.Show(2).AddChidren(openView.Show()); |
| | | completeView.Show(2).AddChidren(closeView.Show()); |
| | | openView.titleBtn.TextID = MyInternationalizationString.logicopen; |
| | | closeView.titleBtn.TextID = MyInternationalizationString.logicclose; |
| | | //门锁数据特殊,进行特殊处理; |
| | | if (actionsInfo.ContainsKey("LinkType")) |
| | | { |
| | | actionsInfo.Remove("LinkType"); |
| | | } |
| | | //目标门锁类型是8; |
| | | actionsInfo.Add("LinkType", 8); |
| | | if (actionsInfo.ContainsKey("TaskList")) |
| | | { |
| | | actionsInfo.Remove("TaskList"); |
| | | } |
| | | if (actionsInfo.ContainsKey("Time")) |
| | | { |
| | | actionsInfo.Remove("Time"); |
| | | } |
| | | closeView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | /// |
| | | openView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | openView.selectedIconBtn.Visible = true; |
| | | closeView.selectedIconBtn.Visible = false; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | SelectedDeviceStatus = "DoorLock"; |
| | | if (actionsInfo.ContainsKey("PassData")) |
| | | { |
| | | actionsInfo.Remove("PassData"); |
| | | } |
| | | actionsInfo.Add("PassData", "055704010112");//门锁常开 |
| | | }; |
| | | ///点击取消事件 |
| | | closeView.clickviewBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | openView.selectedIconBtn.Visible = false; |
| | | closeView.selectedIconBtn.Visible = true; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | SelectedDeviceStatus = "DoorLock"; |
| | | if (actionsInfo.ContainsKey("PassData")) |
| | | { |
| | | actionsInfo.Remove("PassData"); |
| | | } |
| | | actionsInfo.Add("PassData", "055704010113");//门锁常关 |
| | | |
| | | flMain.RemoveFromParent(); |
| | | var memberList = new MemberList(); |
| | | UserView.HomePage.Instance.AddChidren(memberList); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | MemberList.edit = false; |
| | | memberList.Show(common); |
| | | }; |
| | | if (edit) |
| | | { |
| | | foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions) |
| | | { |
| | | if (deviceinfo["LinkType"].ToString() == "8") |
| | | { |
| | | if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString()) |
| | | { |
| | | if (deviceinfo["PassData"].ToString() == "055704010112") |
| | | {//开启 |
| | | openView.selectedIconBtn.Visible = true; |
| | | closeView.selectedIconBtn.Visible = false; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | } |
| | | else |
| | | {//关闭 |
| | | openView.selectedIconBtn.Visible = false; |
| | | closeView.selectedIconBtn.Visible = true; |
| | | openView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor; |
| | | closeView.titleBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; |
| | | |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | case DeviceType.TemperatureSensor: |
| | |
| | | taskListInfo.Add(switchdictionary); |
| | | completeView.Show(l).AddChidren(openView.Show()); |
| | | openView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | |
| | | horizontalSeekBarRowLien.Y = openView.frameLayout.Bottom; |
| | | horizontalSeekBarVol.Y = openView.frameLayout.Bottom; |
| | | completeView.Show(l).AddChidren(horizontalSeekBarRowLien); |
| | | completeView.Show(l).AddChidren(horizontalSeekBarVol); |
| | | |
| | | closeView.frameLayout.Y = horizontalSeekBarRowLien.Bottom; |
| | | completeView.Show(l).AddChidren(closeView.Show()); |
| | | |
| | |
| | | openView.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor; |
| | | |
| | | |
| | | |
| | | horizontalSeekBarRowLien.Y = openView.frameLayout.Bottom; |
| | | horizontalSeekBarVol.Y = openView.frameLayout.Bottom; |
| | | completeView.Show(l).AddChidren(horizontalSeekBarRowLien); |
| | | completeView.Show(l).AddChidren(horizontalSeekBarVol); |
| | | |
| | |
| | | } |
| | | else |
| | | { //添加目标 |
| | | LogicIfon.AddDeviceactions(common, actionsInfo); |
| | | if (SelectedDeviceStatus == "DoorLock") |
| | | {//门锁数据特殊,进行特殊处理; |
| | | LogicIfon.AddDoorLockActions(common, actionsInfo); |
| | | } |
| | | else |
| | | { |
| | | LogicIfon.AddDeviceActions(common, actionsInfo); |
| | | } |
| | | } |
| | | } |
| | | else |