| | |
| | | /// ProgressBtnY |
| | | /// </summary> |
| | | int ProgressBtnY; |
| | | /// <summary> |
| | | /// ProgressBtnX |
| | | /// </summary> |
| | | int ProgressBtnX; |
| | | |
| | | #endregion |
| | | |
| | |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15 |
| | | TextSize = 15, |
| | | IsBold=true |
| | | }; |
| | | itemView.AddChidren(deviceNameBtn); |
| | | |
| | |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.GXCTextGrayColor, |
| | | Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}" |
| | | Text = $"{Language.StringByID(R.MyInternationalizationString.Current)} {device.GetDeviceStatu()}", |
| | | TextSize = 10 |
| | | }; |
| | | itemView.AddChidren(StatuBtn); |
| | | |
| | |
| | | } |
| | | |
| | | SetCurtainType(itemView, (device.CommonDevice as Rollershade).WcdType); |
| | | |
| | | |
| | | var roomBG = new Button |
| | | { |
| | | Y = Application.GetRealHeight(1178 - 50), |
| | |
| | | Height = Application.GetRealHeight(50), |
| | | Text = room.Name, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor, |
| | | TextSize = 12 |
| | | }; |
| | | itemView.AddChidren(roomName); |
| | | } |
| | |
| | | UserView.HomePage.Instance.AddChidren(detailInfo); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | detailInfo.Show(device, room); |
| | | detailInfo.action = () => |
| | | detailInfo.EditAction = (d,r) => |
| | | { |
| | | Show(device, room); |
| | | }; |
| | |
| | | curtainSeekBar.Width = Application.GetRealWidth(570); |
| | | curtainSeekBar.Height = Application.GetRealHeight(513); |
| | | curtainSeekBar.Gravity = Gravity.CenterHorizontal; |
| | | curtainSeekBar.IsProgressTextShow = false; |
| | | curtainSeekBar.Progress = (device.CommonDevice as Rollershade).WcdCurrentPositionLiftPercentage; |
| | | layout.AddChidren(curtainSeekBar); |
| | | |
| | |
| | | { |
| | | (device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainSeekBar.Progress); |
| | | }; |
| | | |
| | | curtainSeekBar.OnStartTrackingTouchEvent += (sender, e) => |
| | | { |
| | | OnProgressButtonMoveForCurtain(curtainSeekBar.Progress); |
| | | ProgressBtn.Visible = true; |
| | | }; |
| | | |
| | | curtainSeekBar.OnStopTrackingTouchEvent += (sender, e) => |
| | | { |
| | | ProgressBtn.Visible = false; |
| | | }; |
| | | |
| | | curtainSeekBar.OnProgressChangedEvent += (send2, e2) => |
| | | { |
| | | |
| | | OnProgressButtonMoveForCurtain(e2); |
| | | |
| | | //判断是否300ms屏蔽 |
| | | //if (curtainRollSeekBar.IsProgressChangeDelay()) return; |
| | | |
| | | //(device.CommonDevice as Rollershade).WcdGoToTiltValue(curtainRollSeekBar.Progress); |
| | | }; |
| | | InitProgressBtnForCurtain(layout); |
| | | } |
| | | } |
| | | |
| | |
| | | Height = Application.GetMinReal(104), |
| | | UnSelectedImagePath = "Item/ProgressBubbles.png", |
| | | Visible = false, |
| | | Gravity = Gravity.CenterHorizontal |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextSize=14, |
| | | IsBold=true, |
| | | TextColor=ZigbeeColor.Current.GXCTextWhiteColor |
| | | }; |
| | | layout.AddChidren(ProgressBtn); |
| | | } |
| | |
| | | ProgressBtn.Text = mProgress + "%"; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 添加进度按钮 |
| | | /// </summary> |
| | | private void InitProgressBtnForCurtain(FrameLayout layout) |
| | | { |
| | | ProgressBtnX = curtainSeekBar.X - Application.GetMinReal(20); |
| | | ProgressBtn = new Button() |
| | | { |
| | | X = ProgressBtnX, |
| | | Y = curtainSeekBar.Y + curtainSeekBar.Height / 2 - Application.GetMinReal(180), |
| | | Width = Application.GetMinReal(135), |
| | | Height = Application.GetMinReal(104), |
| | | UnSelectedImagePath = "Item/ProgressBubbles.png", |
| | | Visible = false, |
| | | TextSize = 14, |
| | | IsBold = true, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | }; |
| | | layout.AddChidren(ProgressBtn); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// OnProgressButtonMove |
| | | /// </summary> |
| | | private void OnProgressButtonMoveForCurtain(int mProgress) |
| | | { |
| | | ProgressBtn.X = ProgressBtnX + curtainSeekBar.NowProgressX- Application.GetMinReal(5); |
| | | ProgressBtn.Text = mProgress + "%"; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ◆ 收藏到主页_______________________ |