old mode 100755
new mode 100644
| | |
| | | Width = Application.GetRealWidth(500), |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = device.CommonDevice.DeviceEpointName, |
| | | Text = Common.LocalDevice.Current.GetDeviceEpointName(device.CommonDevice), |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 15, |
| | | IsBold=true |
| | |
| | | WavePadding = Application.GetRealWidth(8), |
| | | MaxValue=100, |
| | | Progress = (int)(dimmableLight.Level*1.0/MaxLevel*100), |
| | | |
| | | |
| | | CornerRadius= Application.GetRealHeight(58) |
| | | }; |
| | | |
| | |
| | | levelSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor); |
| | | } |
| | | |
| | | levelSeekBar.OnStartTrackingTouchEvent += (sender, e) => |
| | | { |
| | | OnProgressButtonMove(levelSeekBar.Progress); |
| | | levelSeekBar.IsProgressTextShow = false; |
| | | ProgressBtn.Visible = true; |
| | | }; |
| | | |
| | | levelSeekBar.OnStopTrackingTouchEvent += (sender, e) => |
| | | { |
| | | ProgressBtn.Visible = false; |
| | | levelSeekBar.IsProgressTextShow = true; |
| | | dimmableLight.SetLevel((int)(levelSeekBar.Progress * MaxLevel / 100.0)); |
| | | }; |
| | | |
| | | levelSeekBar.OnProgressChangedEvent += (send2, e2) => |
| | | levelSeekBar.OnStartTrackingTouchEvent += (sender, e) =>
|
| | | {
|
| | | OnProgressButtonMove(levelSeekBar.Progress);
|
| | | levelSeekBar.IsProgressTextShow = false;
|
| | | ProgressBtn.Visible = true;
|
| | | };
|
| | |
|
| | | levelSeekBar.OnStopTrackingTouchEvent += (sender, e) =>
|
| | | {
|
| | | ProgressBtn.Visible = false;
|
| | | levelSeekBar.IsProgressTextShow = true;
|
| | | dimmableLight.SetLevel((int)(levelSeekBar.Progress * MaxLevel / 100.0));
|
| | | };
|
| | |
|
| | | levelSeekBar.OnProgressChangedEvent += (send2, e2) =>
|
| | | { |
| | | |
| | | OnProgressButtonMove(e2); |
| | | |
| | | //判断是否300ms屏蔽 |
| | | //if (levelSeekBar.IsProgressChangeDelay()) return; |
| | | //dimmableLight.SetLevel((int)(levelSeekBar.Progress * MaxLevel / 100.0)); |
| | | }; |
| | | |
| | | OnProgressButtonMove(e2);
|
| | |
|
| | | //判断是否300ms屏蔽
|
| | | //if (levelSeekBar.IsProgressChangeDelay()) return;
|
| | | //dimmableLight.SetLevel((int)(levelSeekBar.Progress * MaxLevel / 100.0));
|
| | | };
|
| | |
|
| | | InitProgressBtn(itemView); |
| | | |
| | | switchBtn = new Button() |
| | |
| | | itemView.AddChidren(roomName); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// OnProgressButtonMove |
| | | /// </summary> |
| | | private void OnProgressButtonMove(int mProgress) |
| | | { |
| | | ProgressBtn.Y = ProgressBtnY + levelSeekBar.NowProgressY; |
| | | ProgressBtn.Text = mProgress + "%"; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 添加进度按钮 |
| | | /// </summary> |
| | | /// <summary>
|
| | | /// OnProgressButtonMove
|
| | | /// </summary>
|
| | | private void OnProgressButtonMove(int mProgress)
|
| | | {
|
| | | ProgressBtn.Y = ProgressBtnY + levelSeekBar.NowProgressY;
|
| | | ProgressBtn.Text = mProgress + "%";
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 添加进度按钮
|
| | | /// </summary>
|
| | | private void InitProgressBtn(FrameLayout layout) |
| | | { |
| | | ProgressBtnY = levelSeekBar.Y - Application.GetMinReal(154); |
| | | ProgressBtn = new Button() |
| | | { |
| | | Y = ProgressBtnY, |
| | | Width = Application.GetMinReal(135), |
| | | Height = Application.GetMinReal(104), |
| | | UnSelectedImagePath = "Item/ProgressBubbles.png", |
| | | Visible = false, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | {
|
| | | ProgressBtnY = levelSeekBar.Y - Application.GetMinReal(154);
|
| | | ProgressBtn = new Button()
|
| | | {
|
| | | Y = ProgressBtnY,
|
| | | Width = Application.GetMinReal(135),
|
| | | Height = Application.GetMinReal(104),
|
| | | UnSelectedImagePath = "Item/ProgressBubbles.png",
|
| | | Visible = false,
|
| | | Gravity = Gravity.CenterHorizontal,
|
| | | TextSize = 14, |
| | | IsBold = true, |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor |
| | | }; |
| | | layout.AddChidren(ProgressBtn); |
| | | TextColor = ZigbeeColor.Current.GXCTextWhiteColor
|
| | | };
|
| | | layout.AddChidren(ProgressBtn);
|
| | | } |
| | | |
| | | #endregion |