wxr
2022-07-19 bb4bcd1b320502b36d19aacec52ed886a975249a
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -90,11 +90,11 @@
            this.InitFrameWhiteContent1();
            //刷新当前设备的状态缓存
            this.RefreshNowDeviceStatuMemory(this.device);
            //this.RefreshNowDeviceStatuMemory(this.device);
            //刷新界面状态
            this.RefreshFormStatu();
            //读取状态
                        Control.Ins.SendReadCommand(device);
            Control.Ins.SendReadCommand(device);
            //new System.Threading.Thread(() =>
            //{
            //    while (true)
@@ -128,7 +128,9 @@
                temp = 16;
                device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString());
            }
            arcBar = new DiyArcSeekBar()
            {
                Gravity = Gravity.CenterHorizontal,
@@ -171,7 +173,9 @@
                Text = Convert.ToDouble(temp).ToString(),
                TextAlignment = TextAlignment.Center,
            };
            btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
            FrameWhiteCentet1.AddChidren(btnTemp);
            btnTempUint = new Button()
            {
@@ -193,7 +197,7 @@
                Y = btnTemp.Bottom,
                Width = Application.GetRealWidth(120),
                Height = Application.GetRealHeight(20),
                Text = Language.StringByID(StringId.IndoorTemp) + "20°C",
                Text = Language.StringByID(StringId.Indoor) + " 20°C",
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
            };
@@ -871,7 +875,7 @@
            if (this.device.sid != i_LocalDevice.sid) { return; }
            //刷新当前设备的状态缓存
            this.RefreshNowDeviceStatuMemory(i_LocalDevice);
            //this.RefreshNowDeviceStatuMemory(i_LocalDevice);
            //刷新界面状态
            this.RefreshFormStatu();
        }
@@ -910,6 +914,8 @@
                controlTime = DateTime.Now;
                arcBar.Progress = temp;
                btnTemp.Text = temp.ToString();
                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
                btnTempUint.X = btnTemp.Right;
                device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString());
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.SetTemp, temp.ToString());
@@ -938,6 +944,8 @@
                controlTime = DateTime.Now;
                arcBar.Progress = temp;
                btnTemp.Text = temp.ToString();
                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
                btnTempUint.X = btnTemp.Right;
                device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString());
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.SetTemp, temp.ToString());
@@ -959,6 +967,8 @@
                {
                    device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString());
                    btnTemp.Text = e.ToString();
                    btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
                    btnTempUint.X = btnTemp.Right;
                };
                //arcBar.MouseDownEventHandler = (sender, e) => {
                //    Console.WriteLine("ddd");
@@ -1051,7 +1061,9 @@
                }
                else
                {
                    btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C";
                    //device = FunctionList.List.Functions.Find((obj) => obj.sid == device.sid);
                    btnIndoorTemp.Text = Language.StringByID(StringId.Indoor) + " " + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C";
                    btnMode.SelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode));
                    btnSwing.SelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing));
                    btnWindSpeed.SelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed));
@@ -1062,7 +1074,9 @@
                   
                    arcBar.Progress = temp;
                    btnTemp.Text = temp.ToString() ;
                    btnTemp.Text = temp.ToString();
                    btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
                    btnTempUint.X = btnTemp.Right;
                    if (device.trait_on_off.curValue.ToString() == "on")
                    {
@@ -1101,15 +1115,5 @@
        #endregion
        #region ■ 一般方法___________________________
        /// <summary>
        /// 刷新当前设备的状态缓存
        /// </summary>
        private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
        {
        }
        #endregion
    }
}