wxr
2022-06-30 cda315b3a19919cae922bdbe96bc20eab4e29fcc
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -126,16 +126,16 @@
            #region 控制
            btnUp.MouseUpEventHandler = (sender, e) => {
                if (!device.online)
                {
                    new Tip()
                    {
                        CloseTime = 1,
                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                        Direction = AMPopTipDirection.None,
                    }.Show(MainPage.BaseView);
                    return;
                }
                //if (!device.online)
                //{
                //    new Tip()
                //    {
                //        CloseTime = 1,
                //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                //        Direction = AMPopTipDirection.None,
                //    }.Show(MainPage.BaseView);
                //    return;
                //}
                new System.Threading.Thread(() =>
                {
                    System.Threading.Thread.Sleep(2000);
@@ -151,16 +151,16 @@
            };
            //----
            btnStop.MouseUpEventHandler = (sender, e) => {
                if (!device.online)
                {
                    new Tip()
                    {
                        CloseTime = 1,
                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                        Direction = AMPopTipDirection.None,
                    }.Show(MainPage.BaseView);
                    return;
                }
                //if (!device.online)
                //{
                //    new Tip()
                //    {
                //        CloseTime = 1,
                //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                //        Direction = AMPopTipDirection.None,
                //    }.Show(MainPage.BaseView);
                //    return;
                //}
                new System.Threading.Thread(() =>
                {
                    System.Threading.Thread.Sleep(2000);
@@ -174,7 +174,7 @@
                d.Add(FunctionAttributeKey.Position, "stop");
                Control.Ins.SendWriteCommand(device, d);
            };
            if (!device.online)
            //if (!device.online)
            {
                btnUp.MouseDownEventHandler = (sender, e) => {
                    btnUp.IsSelected = true;
@@ -189,16 +189,16 @@
                };
            }
            btnDown.MouseUpEventHandler = (sender, e) => {
                if (!device.online)
                {
                    new Tip()
                    {
                        CloseTime = 1,
                        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                        Direction = AMPopTipDirection.None,
                    }.Show(MainPage.BaseView);
                    return;
                }
                //if (!device.online)
                //{
                //    new Tip()
                //    {
                //        CloseTime = 1,
                //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                //        Direction = AMPopTipDirection.None,
                //    }.Show(MainPage.BaseView);
                //    return;
                //}
                new System.Threading.Thread(() =>
                {
                    System.Threading.Thread.Sleep(2000);
@@ -242,16 +242,16 @@
                EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                {
                    if (!device.online)
                    {
                        new Tip()
                        {
                            CloseTime = 1,
                            Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                            Direction = AMPopTipDirection.None,
                        }.Show(MainPage.BaseView);
                    return;
                    }
                    //if (!device.online)
                    //{
                    //    new Tip()
                    //    {
                    //        CloseTime = 1,
                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                    //        Direction = AMPopTipDirection.None,
                    //    }.Show(MainPage.BaseView);
                    //return;
                    //}
                    string onoff = hotDryView.Lighting ? "false" : "true";
                    device.SetAttrState(FunctionAttributeKey.HotDry, onoff);
                    Dictionary<string, string> d = new Dictionary<string, string>();
@@ -281,16 +281,16 @@
                EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                {
                    if (!device.online)
                    {
                        new Tip()
                        {
                            CloseTime = 1,
                            Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                            Direction = AMPopTipDirection.None,
                        }.Show(MainPage.BaseView);
                    return;
                    }
                    //if (!device.online)
                    //{
                    //    new Tip()
                    //    {
                    //        CloseTime = 1,
                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                    //        Direction = AMPopTipDirection.None,
                    //    }.Show(MainPage.BaseView);
                    //return;
                    //}
                    string onoff = windDryView.Lighting ? "false" : "true";
                    device.SetAttrState(FunctionAttributeKey.WindDry, onoff);
                    Dictionary<string, string> d = new Dictionary<string, string>();
@@ -326,16 +326,16 @@
                EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                {
                    if (!device.online)
                    {
                        new Tip()
                        {
                            CloseTime = 1,
                            Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                            Direction = AMPopTipDirection.None,
                        }.Show(MainPage.BaseView);
                    return;
                    }
                    //if (!device.online)
                    //{
                    //    new Tip()
                    //    {
                    //        CloseTime = 1,
                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                    //        Direction = AMPopTipDirection.None,
                    //    }.Show(MainPage.BaseView);
                    //return;
                    //}
                    string onoff = disinfectView.Lighting ? "false" : "true";
                    device.SetAttrState(FunctionAttributeKey.Disinfect, onoff);
                    Dictionary<string, string> d = new Dictionary<string, string>();
@@ -376,16 +376,16 @@
                EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
                {
                    if (!device.online)
                    {
                        new Tip()
                        {
                            CloseTime = 1,
                            Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                            Direction = AMPopTipDirection.None,
                        }.Show(MainPage.BaseView);
                    return;
                    }
                    //if (!device.online)
                    //{
                    //    new Tip()
                    //    {
                    //        CloseTime = 1,
                    //        Text = Language.StringByID(StringId.DeviceOfflineCannotOption),
                    //        Direction = AMPopTipDirection.None,
                    //    }.Show(MainPage.BaseView);
                    //return;
                    //}
                    string onoff = lightingView.Lighting ? "off" : "on";
                    device.SetAttrState(FunctionAttributeKey.OnOff, onoff);
                    Dictionary<string, string> d = new Dictionary<string, string>();