wxr
2023-09-11 ec5a167e0366a75642e45dbd30817c1c8ae57e79
OnPro/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -93,8 +93,6 @@
        /// </summary>
        void LoadEvent_DimmerBar()
        {
            if (function.isOnline())
            {
                dimmerBar.OnStartTrackingTouchEvent = (sender, e) =>
                {
                    curDimmerStatus = onDimmerBar = true;
@@ -150,7 +148,6 @@
                    btnBrightnessText.Text = dimmerBar.Progress + "%";
                };
            }
        }
        /// <summary>
        /// 加载开关事件
        /// </summary>
@@ -158,16 +155,6 @@
        {
            btnSwitch.MouseUpEventHandler += (sender, e) =>
            {
                if (!function.isOnline())
                {
                    new Tip()
                    {
                        CloseTime = 1,
                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                        Direction = AMPopTipDirection.None,
                    }.Show(MainPage.BaseView);
                    return;
                }
                btnSwitch.IsSelected = !btnSwitch.IsSelected;
                if (btnSwitch.IsSelected)
                {
@@ -186,18 +173,6 @@
                    {
                        d.Add(FunctionAttributeKey.FadeTime, barFadeTime.Progress.ToString());
                    }
                    //if (btnSwitch.IsSelected)
                    //{
                    //    if(function.lastBrightness == 0)
                    //    {
                    //        function.lastBrightness = 100;
                    //    }
                    //    d.Add(FunctionAttributeKey.Brightness, function.lastBrightness.ToString());
                    //}
                    //else
                    //{
                    //    function.lastBrightness = Convert.ToInt32( function.GetAttrState(FunctionAttributeKey.Brightness));
                    //}
                    Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();