HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-12-31 fe3b2466c68b5db70d38e78039703add3b8b1dfe
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceColorLightDetailCardForm.cs
@@ -53,8 +53,10 @@
            this.ScrollEnabled = false;
            //先清空
            this.listControl = new List<ButtonBase>();
            //设置初始状态
            this.IsLightOpen = ((LightBase)this.device).OnOffStatus == 1;
            //设置状态文字
            if (((LightBase)this.device).OnOffStatus == 1)
            if (this.IsLightOpen == true)
            {
                //亮度 XX
                this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uBrightness) + "  " + HdlDeviceOtherLogic.Current.GetDeviceStatu(this.device));
@@ -75,7 +77,14 @@
            waveSeekBar.MaxValue = 100;
            waveSeekBar.Progress = (int)(((DimmableLight)this.device).Level * 1.0 / MaxLevel * 100);
            waveSeekBar.CornerRadius = Application.GetRealHeight(58);
            waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarColor_Start, ZigbeeColor.Current.GXCWaveSeekBarColor_End);
            if (this.IsLightOpen == true)
            {
                waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarColor_Start, ZigbeeColor.Current.GXCWaveSeekBarColor_End);
            }
            else
            {
                waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
            }
            frameWhiteBack.AddChidren(waveSeekBar);
            //开关
@@ -84,6 +93,7 @@
            btnSwitch.SelectedImagePath = "Item/SwitchSelected.png";
            btnSwitch.Y = waveSeekBar.Bottom + Application.GetRealHeight(84);
            btnSwitch.Gravity = Gravity.CenterHorizontal;
            btnSwitch.IsSelected = this.IsLightOpen;
            frameWhiteBack.AddChidren(btnSwitch);
            listControl.Add(btnSwitch);
            btnSwitch.ButtonClickEvent += (sender, e) =>
@@ -91,13 +101,6 @@
                //发送开关命令
                this.SetSwitchCommand(!btnSwitch.IsSelected);
            };
            //设置初始状态
            this.IsLightOpen = ((LightBase)this.device).OnOffStatus == 1;
            if (IsLightOpen == true)
            {
                btnSwitch.IsSelected = true;
            }
            //彩灯控件里面的那个显示百分比的控件
            int progressY = waveSeekBar.Y - Application.GetMinReal(154);
@@ -304,6 +307,14 @@
            {
                //开关状态变更
                listControl[0].IsSelected = isOpen;
                if (isOpen == true)
                {
                    waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarColor_Start, ZigbeeColor.Current.GXCWaveSeekBarColor_End);
                }
                else
                {
                    waveSeekBar.SetProgressBarColors(ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor, ZigbeeColor.Current.GXCWaveSeekBarUnSelectedColor);
                }
            }
            this.IsLightOpen = isOpen;