old mode 100755
new mode 100644
| | |
| | | /// 选中该设备功能作为条件或者目标的视图方法 |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | public static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit, string str) |
| | | public static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit, string str ) |
| | | { |
| | | #region -------界面布局部分 |
| | | //不让当前界面滑动 |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | CompleteView completeView = new CompleteView(); |
| | | flMain.AddChidren(completeView.Show(1)); |
| | | completeView.Btntitle.Text = common.DeviceEpointName; |
| | | completeView.Btntitle.Text = LocalDevice.Current.GetDeviceEpointName(common); |
| | | 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: |
| | | { |
| | | |
| | | flMain.RemoveFromParent(); |
| | | var memberList = new MemberList(); |
| | | UserView.HomePage.Instance.AddChidren(memberList); |
| | |
| | | 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 |