wei
2021-07-09 068c68295cad1967f7aafb4e5e951260ef03d4ce
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -12,7 +12,7 @@
        /// </summary>
        public static void UpdataStates(Function updataTemp)
        {
            Application.RunOnMainThread((() =>
            Application.RunOnMainThread((Action)(() =>
            {
                try
                {
@@ -22,7 +22,7 @@
                    {
                        bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%";
                        bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32( updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(288 - 16 - 16) / 100) + Application.GetRealWidth(40);
                        if (updataTemp.trait_on_off.curValue.ToString() == "on")
                        if (updataTemp.trait_on_off.state.ToString() == "on")
                        {
                            bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1);
                            if (!bodyView.onDimmerBar)
@@ -34,7 +34,7 @@
                        {
                            bodyView.dimmerBar.SetProgressBarColors(CSS_Color.DividingLineColor, CSS_Color.DividingLineColor);
                        }
                        bodyView.btnSwitch.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on";
                        bodyView.btnSwitch.IsSelected = updataTemp.trait_on_off.state.ToString() == "on";
                    }
                }
                catch (Exception ex)
@@ -154,9 +154,9 @@
                }
                new System.Threading.Thread(() =>
                {
                    function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                    function.trait_on_off.state = btnSwitch.IsSelected ? "on" : "off";
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
                    d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.state.ToString());
                    d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime));
                    if (btnSwitch.IsSelected)
                    {