wxr
2023-09-11 ec5a167e0366a75642e45dbd30817c1c8ae57e79
OnPro/HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs
@@ -63,16 +63,6 @@
        {
            btnSwitchIcon.MouseUpEventHandler = (sender, e) =>
            {
                if (!function.isOnline())
                {
                    new Tip()
                    {
                        CloseTime = 1,
                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                        Direction = AMPopTipDirection.None,
                    }.Show(MainPage.BaseView);
                    return;
                }
                btnSwitch.IsSelected = btnSwitchIcon.IsSelected = !btnSwitchIcon.IsSelected;
                new System.Threading.Thread(() =>
                {
@@ -85,16 +75,6 @@
            };
            btnSwitch.MouseUpEventHandler = (sender, e) =>
            {
                if (!function.isOnline())
                {
                    new Tip()
                    {
                        CloseTime = 1,
                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                        Direction = AMPopTipDirection.None,
                    }.Show(MainPage.BaseView);
                    return;
                }
                btnSwitchIcon.IsSelected = btnSwitch.IsSelected = !btnSwitch.IsSelected;
                new System.Threading.Thread(() =>
                {
@@ -105,26 +85,6 @@
                })
                { IsBackground = true }.Start();
                //new System.Threading.Thread(() =>
                //{
                //    bool fff = false;
                //    while (true)
                //    {
                //        System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                //        if (fff)
                //        {
                //            d.Add("on_off", "off");
                //        }
                //        else
                //        {
                //            d.Add("on_off", "on");
                //        }
                //        fff = !fff;
                //        DriverLayer.Control.Ins.SendWriteCommand(function, d);
                //        //System.Threading.Thread.Sleep(100);
                //    }
                //})
                //{ IsBackground = true }.Start();
            };
        }