wxr
2022-07-08 f16e7e4df7e7813e4a3052dae752aae3e6937b30
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>
@@ -119,7 +120,8 @@
        private void InitFrameWhiteContent1()
        {
            //获取温度值
            temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
            string setTempTemp = device.GetAttrState(FunctionAttributeKey.SetTemp);
            temp = (int) Convert.ToDouble(setTempTemp);
            if (temp <= 0)
            {
                //默认值改成16,2022年06月10日10:03:19 成甫要求的
@@ -949,7 +951,7 @@
                    device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
                    btnTemp.Text = arcBar.Progress.ToString();
                    controlTime = DateTime.Now;
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
                    Control.Ins.SendWriteCommand(device, d);
                };