wxr
2022-06-30 af0269cf1d551fb799784df233d8d9c388c6b18b
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -94,23 +94,24 @@
            //刷新界面状态
            this.RefreshFormStatu();
            //读取状态
            new System.Threading.Thread(() =>
            {
                while (true)
                {
                    if(controlTime == DateTime.MinValue)
                    {
                    }
                    else if (controlTime.AddSeconds(2)<DateTime.Now)
                    {
                        Control.Ins.SendReadCommand(device);
                        controlTime = DateTime.MinValue;
                    }
                    System.Threading.Thread.Sleep(1000);
                }
            })
            { IsBackground = true }.Start();
            //new System.Threading.Thread(() =>
            //{
            //    while (true)
            //    {
            //        if(controlTime == DateTime.MinValue)
            //        {
            //        }
            //        else if (controlTime.AddSeconds(2)<DateTime.Now)
            //        {
            //            Control.Ins.SendReadCommand(device);
            //            controlTime = DateTime.MinValue;
            //        }
            //        System.Threading.Thread.Sleep(1000);
            //    }
            //})
            //{ IsBackground = true }.Start();
        }
        /// <summary>
@@ -118,7 +119,15 @@
        /// </summary>
        private void InitFrameWhiteContent1()
        {
            //获取温度值
            temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
            if (temp <= 0)
            {
                //默认值改成16,2022年06月10日10:03:19 成甫要求的
                temp = 16;
                device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString());
            }
            arcBar = new DiyArcSeekBar()
            {
                Gravity = Gravity.CenterHorizontal,
@@ -147,7 +156,7 @@
            arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off";
            arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min;
            arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max;
            arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
            arcBar.Progress = temp;
            btnTemp = new Button()
            {
@@ -158,7 +167,7 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = 50,
                IsBold = true,
                Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(),
                Text = Convert.ToDouble(temp).ToString(),
                TextAlignment = TextAlignment.Center,
            };
            FrameWhiteCentet1.AddChidren(btnTemp);
@@ -358,7 +367,7 @@
                };
                EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                {
                    if (!device.online2d)
                    if (!device.online)
                    {
                        new Tip()
                        {
@@ -494,7 +503,7 @@
                };
                EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                {
                    if (!device.online2d)
                    if (!device.online)
                    {
                        new Tip()
                        {
@@ -618,7 +627,7 @@
                };
                EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
                {
                    if (!device.online2d)
                    if (!device.online)
                    {
                        new Tip()
                        {
@@ -814,7 +823,7 @@
                btn.MouseUpEventHandler = (sender, e) =>
                {
                    if (!device.online2d)
                    if (!device.online)
                    {
                        new Tip()
                        {
@@ -877,7 +886,7 @@
        {
            btnMinus.MouseUpEventHandler = (sender, e) =>
            {
                if (!device.online2d)
                if (!device.online)
                {
                    new Tip()
                    {
@@ -907,7 +916,7 @@
            };
            btnPlus.MouseUpEventHandler = (sender, e) =>
            {
                if (!device.online2d)
                if (!device.online)
                {
                    new Tip()
                    {
@@ -933,7 +942,7 @@
                d.Add(FunctionAttributeKey.SetTemp, temp.ToString());
                Control.Ins.SendWriteCommand(device, d);
            };
            if (!device.online2d)
            if (!device.online)
            {
                arcBar.OnStopTrackingTouchEvent = (sender, e) =>
                {
@@ -994,7 +1003,7 @@
            btnSwitch.MouseUpEventHandler = (sender, e) =>
            {
                if (!device.online2d)
                if (!device.online)
                {
                    new Tip()
                    {
@@ -1049,7 +1058,7 @@
                    btnSwing.UnSelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing), false);
                    btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed), false);
                    temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")));
                    arcBar.Progress = temp;
                    btnTemp.Text = temp.ToString() ;