wxr
2020-09-09 c3e1b733fc45bd9f0b88bfb560cfa87a270b079b
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -19,7 +19,10 @@
                        return;
                    if (uFunction.functionType == bodyView.light.functionType && uFunction.sid == bodyView.light.sid)
                    {
                        bodyView.dimmerBar.Progress = uFunction.brightness;
                        if (!bodyView.onDimmerBar)
                        {
                            bodyView.dimmerBar.Progress = uFunction.brightness;
                        }
                        if (uFunction.trait_on_off.value.ToString() == "on")
                        {
@@ -102,18 +105,18 @@
                        light.refreshTime = DateTime.Now;
                        new System.Threading.Thread(() =>
                        {
                            //Control.Send(CommandType_A.write, light);
                            System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                            d.Add("brightness", light.brightness.ToString());
                            Control.SendWriteCommand(light, d);
                        })
                        { IsBackground = true }.Start();
                    }
                    else
                    {
                        MainPage.Log("skip control!!");
                    }
                }
                MainPage.Log( dimmerBar.NowProgressY.ToString());
                //btnBrightnessText.Y = dimmerBar.NowProgressY + Application.GetRealWidth(40);
                btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(288 - 16 - 16) / 100) + Application.GetRealWidth(40);
                btnBrightnessText.Text = light.brightness + "%";
            };
        }