gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
old mode 100755 new mode 100644
@@ -371,7 +371,7 @@
                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
@@ -400,7 +400,7 @@
                WavePadding = Application.GetRealWidth(8),
                MaxValue=100,
                Progress = (int)(dimmableLight.Level*1.0/MaxLevel*100),
                CornerRadius= Application.GetRealHeight(58)
            };
@@ -417,30 +417,30 @@
                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()
@@ -496,34 +496,34 @@
            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