wxr
2023-01-11 6b1887c73b48211f5d02fdad9b4b17d9b81cd0b8
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -123,15 +123,25 @@
                    Text = "---",
                    IsBold = true,
                };
                if(setTempAttr.step == "0.5")
                if (setTempAttr.step == "0.5")
                {
                    btnTemp.Text = Convert.ToDouble(setTempAttr.curValue).ToString("0.0");
                }
                else
                {
                    btnTemp.Text = setTempAttr.curValue.ToString();
                    if (setTempAttr.curValue.ToString().Contains("."))
                    {
                        btnTemp.Text = setTempAttr.curValue.ToString().Split(".")[0];
                    }else
                    {
                        btnTemp.Text = setTempAttr.curValue.ToString();
                    }
                }
                btnTemp.Width = btnTemp.GetTextWidth();
#if __IOS__
                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10);
#else
                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
#endif
                FrameWhiteCentet1.AddChidren(btnTemp);
@@ -171,8 +181,8 @@
                var btnMinTemp = new Button()
                {
                    X = Application.GetRealWidth(26),
                    Width = Application.GetRealWidth(18),
                    X = Application.GetRealWidth(22),
                    Width = Application.GetRealWidth(22),
                    TextAlignment = TextAlignment.Center,
                    Text = setTempAttr.min.ToString(),
                    TextSize = 12,
@@ -217,7 +227,7 @@
                var btnMaxTemp = new Button()
                {
                    X = setTempBar.Right,
                    Width = Application.GetRealWidth(18),
                    Width = Application.GetRealWidth(24),
                    TextAlignment = TextAlignment.Center,
                    Text = setTempAttr.max.ToString(),
                    TextSize = 12,
@@ -284,6 +294,13 @@
                {
                    btnTemp.Text = (setTempAttr.min + e).ToString();
                }
#if __IOS__
                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10);
#else
                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
#endif
                btnTempUint.X = btnTemp.Right;
            };
            setTempBar.OnStopTrackingTouchEvent = (sender,e) =>{
                temp = e;
@@ -296,6 +313,13 @@
                {
                    btnTemp.Text = (setTempAttr.min + e).ToString();
                }
#if __IOS__
                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10);
#else
                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
#endif
                btnTempUint.X = btnTemp.Right;
                controlTime = DateTime.Now;
                Dictionary<string, string> d = new Dictionary<string, string>();
                d.Add(FunctionAttributeKey.SetTemp, e.ToString());
@@ -970,12 +994,16 @@
                if (device.trait_on_off.curValue.ToString() == "on")
                {
                    btnSwitch.IsSelected = true;
                    setTempBar.IsOffline = false;
                    //setTempBar.IsOffline = false;
                    //setTempBar.Enable = true;
                    //setTempBar.ProgressBarColor = CSS_Color.MainColor;
                }
                else
                {
                    btnSwitch.IsBold = false;
                    setTempBar.IsOffline = true;
                    //setTempBar.IsOffline = true;
                    //setTempBar.Enable = false;
                    //setTempBar.ProgressBarColor = CSS_Color.DividingLineColor;
                }
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.OnOff, device.trait_on_off.curValue.ToString());
@@ -1025,13 +1053,19 @@
                        btnTemp.Text = temp.ToString();
                    }
                    //btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
                    //btnTempUint.X = btnTemp.Right;
#if __IOS__
                    btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10);
#else
                btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5);
#endif
                    btnTempUint.X = btnTemp.Right;
                    if (device.trait_on_off.curValue.ToString() == "on")
                    {
                        btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = true;
                        setTempBar.IsOffline = false;
                        setTempBar.Enable = true;
                        setTempBar.ProgressBarColor = CSS_Color.MainColor;
                        btnSwitch.IsSelected = true;
                        if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan")
                        {
@@ -1045,7 +1079,9 @@
                    else
                    {
                        btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = false;
                        setTempBar.IsOffline = true;
                        setTempBar.Enable = false;
                        setTempBar.ProgressBarColor = CSS_Color.DividingLineColor;
                        btnSwitch.IsSelected = false;
                        setTempBar.IsClickable = false;
                    }