JLChen
2021-02-05 427a6e93b8946b9d91727166a352b2ee2ef75d19
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -12,12 +12,12 @@
        /// <param name="uCurtain"></param>
        public static void UpdataState(Curtain uCurtain)
        {
            Application.RunOnMainThread(() => {
            Application.RunOnMainThread((Action)(() => {
                if (bodyView == null)
                    return;
                if (bodyView.onControl)
                    return;
                if (uCurtain.functionType == bodyView.curtain.functionType && uCurtain.sid == bodyView.curtain.sid)
                if (uCurtain.spk == bodyView.curtain.spk && uCurtain.sid == bodyView.curtain.sid)
                {
                    if (uCurtain.trait_on_off.curValue.ToString() == "stop")
                    {
@@ -46,7 +46,7 @@
                    }
                    catch { }
                }
            });
            }));
        }
        /// <summary>
@@ -184,23 +184,23 @@
                CurtainAnimation(curtain.percent);
            };
            btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
            {
                curtain.percent--;
                controlBar.Progress = curtain.percent;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            };
            //btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
            //{
            //    curtain.percent--;
            //    controlBar.Progress = curtain.percent;
            //    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
            //    d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
            //    DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            //};
            btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
            {
                curtain.percent++;
                controlBar.Progress = curtain.percent;
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
                DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            };
            //btnPlusSgnIcon.MouseUpEventHandler = (sender, e) =>
            //{
            //    curtain.percent++;
            //    controlBar.Progress = curtain.percent;
            //    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
            //    d.Add(FunctionAttributeKey.Percent, curtain.percent.ToString());
            //    DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            //};
            //curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
            //{
@@ -220,7 +220,7 @@
            //};
            curtainSeekBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                controlBar.Progress = curtainSeekBar.Progress;
                //controlBar.Progress = curtainSeekBar.Progress;
                new System.Threading.Thread(() =>
                {
                    curtain.percent = e;
@@ -249,19 +249,19 @@
            //    { IsBackground = true }.Start();
            //};
            controlBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                curtainSeekBar.Progress = controlBar.Progress;
                new System.Threading.Thread(() =>
                {
                    curtain.percent = e;
                    curtain.refreshTime = DateTime.Now;
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add("percent", curtain.percent.ToString());
                    DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
                })
                { IsBackground = true }.Start();
            };
            //controlBar.OnStopTrackingTouchEvent = (sender, e) =>
            //{
            //    curtainSeekBar.Progress = controlBar.Progress;
            //    new System.Threading.Thread(() =>
            //    {
            //        curtain.percent = e;
            //        curtain.refreshTime = DateTime.Now;
            //        System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
            //        d.Add("percent", curtain.percent.ToString());
            //        DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
            //    })
            //    { IsBackground = true }.Start();
            //};
        }
    }