From 3f6685c77beeb12baf840733fb890860f4c26e7c Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 25 七月 2024 17:25:59 +0800 Subject: [PATCH] 2024年07月25日17:24:45 --- HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs | 548 +++++++++++++++++++++++++++--------------------------- 1 files changed, 274 insertions(+), 274 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs index f7af085..2dc3048 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs @@ -14,15 +14,16 @@ /// <summary> /// 绌鸿皟娓╁害鎺у埗鎺т欢 /// </summary> - DiyArcSeekBar arcBar; + //DiyArcSeekBar arcBar; + DiyImageSeekBar setTempBar; /// <summary> /// 鍑忓彿鎸夐挳 /// </summary> - Button btnMinus; + //Button btnMinus; /// <summary> /// 鍔犲彿鎸夐挳 /// </summary> - Button btnPlus; + //Button btnPlus; /// <summary> /// 娓╁害鎸夐挳 /// </summary> @@ -55,10 +56,6 @@ /// 鎺у埗鏃堕棿 /// </summary> DateTime controlTime = DateTime.MinValue.AddDays(10); - /// <summary> - /// 鎺у埗娓╁害 - /// </summary> - int temp = 16; #endregion @@ -90,28 +87,11 @@ this.InitFrameWhiteContent1(); //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� - this.RefreshNowDeviceStatuMemory(this.device); + //this.RefreshNowDeviceStatuMemory(this.device); //鍒锋柊鐣岄潰鐘舵�� this.RefreshFormStatu(); //璇诲彇鐘舵�� - Control.Ins.SendReadCommand(device); - //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(); + Control.Ins.SendReadCommand(device); } /// <summary> @@ -120,103 +100,144 @@ private void InitFrameWhiteContent1() { //鑾峰彇娓╁害鍊� - temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); + string setTempTemp = device.GetAttrState(FunctionAttributeKey.SetTemp); + var temp = (int)Convert.ToDouble(setTempTemp); if (temp <= 0) { - //榛樿鍊兼敼鎴�16,2022骞�06鏈�10鏃�10:03:19 鎴愮敨瑕佹眰鐨� + //榛樿鍊兼敼鎴�16 temp = 16; device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); } - - arcBar = new DiyArcSeekBar() + + + var setTempAttr = device.GetAttribute(FunctionAttributeKey.SetTemp); { - Gravity = Gravity.CenterHorizontal, - OpenAngle = 160, - ThumbImageHeight = Application.GetRealWidth(50), - ProgressBarColor = CSS_Color.MainColor, - OfflineProgressBarColor = CSS_Color.PromptingColor2, - ArcColor = CSS_Color.BackgroundColor, + btnTemp = new Button() + { + Y = Application.GetRealHeight(121), + Gravity = Gravity.CenterHorizontal, + Height = Application.GetRealHeight(70), + TextAlignment = TextAlignment.TopCenter, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = 60, + Text = "---", + IsBold = true, + }; + if (setTempAttr.step == "0.5") + { + btnTemp.Text = Convert.ToDouble(setTempAttr.curValue).ToString("0.0"); + } + else + { + if (setTempAttr.curValue.ToString().Contains(".")) + { + btnTemp.Text = setTempAttr.curValue.ToString().Split(".")[0]; + } + else + { + btnTemp.Text = setTempAttr.curValue.ToString(); + } + } #if __IOS__ - Y = Application.GetRealHeight(120 + 25), - Width = Application.GetRealWidth(260 - 40), - Height = Application.GetRealWidth(260 - 40), - SeekBarPadding = Application.GetRealWidth(8), + btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10); #else - Y = Application.GetRealHeight(120 + 40), - Width = Application.GetRealWidth(260 - 40), - Height = Application.GetRealWidth(260 - 40), - SeekBarPadding = Application.GetRealWidth(7), + btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5); #endif + FrameWhiteCentet1.AddChidren(btnTemp); - }; - FrameWhiteCentet1.AddChidren(arcBar); - - arcBar.ThumbImagePath = device.GetAttrState(FunctionAttributeKey.OnOff) == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; - arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off"; - arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min; - arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max; - arcBar.Progress = temp; + btnTempUint = new Button() + { + X = btnTemp.Right, + Y = Application.GetRealHeight(131), + Width = Application.GetRealWidth(30), + Height = Application.GetRealHeight(30), + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.EmphasisFontSize_Secondary, + IsBold = true, + TextAlignment = TextAlignment.CenterLeft, + Text = acFunction.GetTempUnitString(device), + }; + FrameWhiteCentet1.AddChidren(btnTempUint); - btnTemp = new Button() - { - Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(206), - Width = Application.GetRealWidth(71), - Height = Application.GetRealWidth(60), - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = 50, - IsBold = true, - Text = Convert.ToDouble(temp).ToString(), - TextAlignment = TextAlignment.Center, - }; - FrameWhiteCentet1.AddChidren(btnTemp); + btnIndoorTemp = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = btnTemp.Bottom, + Width = Application.GetRealWidth(120), + Height = Application.GetRealHeight(30), + Text = Language.StringByID(StringId.Indoor) + " 20" + acFunction.GetTempUnitString(device), + TextColor = CSS_Color.PromptingColor1, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextAlignment = TextAlignment.TopCenter, + }; + FrameWhiteCentet1.AddChidren(btnIndoorTemp); - btnTempUint = new Button() - { - X = btnTemp.Right, - Y = btnTemp.Y, - Width = Application.GetRealWidth(30), - Height = Application.GetRealHeight(30), - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.EmphasisFontSize_Secondary, - IsBold = true, - TextAlignment = TextAlignment.CenterLeft, - Text = "掳C", - }; - FrameWhiteCentet1.AddChidren(btnTempUint); + var setTempView = new FrameLayout() + { + Height = Application.GetRealHeight(80), + Y = Application.GetRealHeight(10) + btnIndoorTemp.Bottom, + }; + FrameWhiteCentet1.AddChidren(setTempView); - btnIndoorTemp = new Button() - { - Gravity = Gravity.CenterHorizontal, - Y = btnTemp.Bottom, - Width = Application.GetRealWidth(120), - Height = Application.GetRealHeight(20), - Text = Language.StringByID(StringId.IndoorTemp) + "20掳C", - TextColor = CSS_Color.PromptingColor1, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - }; - FrameWhiteCentet1.AddChidren(btnIndoorTemp); + var btnMinTemp = new Button() + { + X = Application.GetRealWidth(22), + Width = Application.GetRealWidth(22), + TextAlignment = TextAlignment.Center, + Text = setTempAttr.min.ToString(), + TextSize = 12, + TextColor = 0xFFC0C7D4, + }; + setTempView.AddChidren(btnMinTemp); - btnMinus = new Button() - { - X = Application.GetRealWidth(21), - Y = Application.GetRealHeight(263), - Width = Application.GetRealWidth(32), - Height = Application.GetRealWidth(32), - UnSelectedImagePath = "Public/MinusSignIcon.png", - }; - FrameWhiteCentet1.AddChidren(btnMinus); + setTempBar = new DiyImageSeekBar() + { + X = btnMinTemp.Right, + Y = Application.GetRealHeight(4), + Width = Application.GetRealWidth(240), + //Height = Application.GetRealHeight(41), + //ProgressBarColor = CSS_Color.MainColor, + //SeekBarBackgroundColor = CSS_Color.BackgroundColor, + //MinValue = 16, + //MaxValue = 30, + //IsProgressTextShow = false, + //ThumbImageHeight = 30, - btnPlus = new Button() - { - X = Application.GetRealWidth(275), - Y = Application.GetRealHeight(263), - Width = Application.GetRealWidth(32), - Height = Application.GetRealWidth(32), - UnSelectedImagePath = "Public/PlusSignIcon.png", - }; - FrameWhiteCentet1.AddChidren(btnPlus); + //Width = Application.GetRealWidth(238), + Height = Application.GetRealHeight(72), + SeekBarViewHeight = Application.GetRealHeight(14), + ThumbImagePath = "FunctionIcon/Acst/ThumbImage.png", + ThumbImageHeight = Application.GetRealHeight(51), + ProgressBarColor = device.trait_on_off.curValue.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.DividingLineColor, + Progress = 0, + SeekBarPadding = Application.GetRealWidth(20), + IsProgressTextShow = false, + ProgressChangeDelayTime = 0, + }; + if (setTempAttr.step == "0.5") + { + setTempBar.MaxValue = (setTempAttr.max - setTempAttr.min) * 2; + } + else + { + setTempBar.MaxValue = (setTempAttr.max - setTempAttr.min); + } + setTempView.AddChidren(setTempBar); + + var btnMaxTemp = new Button() + { + X = setTempBar.Right, + Width = Application.GetRealWidth(24), + TextAlignment = TextAlignment.Center, + Text = setTempAttr.max.ToString(), + TextSize = 12, + TextColor = 0xFFC0C7D4, + }; + setTempView.AddChidren(btnMaxTemp); + + } + btnMode = new Button() { @@ -265,7 +286,49 @@ }; FrameWhiteCentet1.AddChidren(btnSwitch); - LoadEvent_TempChange(); + setTempBar.OnProgressChangedEvent = (sender, e) => { + if (setTempAttr.step == "0.5") + { + btnTemp.Text = (setTempAttr.min + ((double)e / 2)).ToString("0.0"); + } + else + { + 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; + Dictionary<string, string> d = new Dictionary<string, string>(); + device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString()); + if (setTempAttr.step == "0.5") + { + double ex = (double)e / 2; + btnTemp.Text = (setTempAttr.min + ((double)ex)).ToString("0.0"); + d.Add(FunctionAttributeKey.SetTemp, (setTempAttr.min + ex).ToString()); + } + else + { + btnTemp.Text = (setTempAttr.min + e).ToString(); + d.Add(FunctionAttributeKey.SetTemp, (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; + Control.Ins.SendWriteCommand(device, d); + }; + LoadEvent_AcStatesChange(); LoadDiv_IrView(); @@ -348,7 +411,7 @@ btnModeIcon.UnSelectedImagePath = acFunction.GetModeIconPath(m, false); btnModeIcon.SelectedImagePath = acFunction.GetModeIconPath(m); - btnModeText.Text = acFunction.GetModeAttrText( m); + btnModeText.Text = acFunction.GetModeAttrText(m); if (modeList.IndexOf(m) < modeList.Count - 1) { @@ -383,15 +446,16 @@ d.Add(FunctionAttributeKey.Mode, m); Control.Ins.SendWriteCommand(device, d); dialog.Close(); - if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") + if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan" || device.GetAttrState(FunctionAttributeKey.Mode) == "dry") { - arcBar.IsClickable = false; - arcBar.IsOffline = true; + + setTempBar.IsClickable = false; + setTempBar.IsOffline = true; } else { - arcBar.IsOffline = false; - arcBar.IsClickable = true; + setTempBar.IsOffline = false; + setTempBar.IsClickable = true; } }; btnModeIcon.MouseUpEventHandler = eventHandler1; @@ -605,7 +669,7 @@ TextSize = CSS_FontSize.TextFontSize, }; modeChangeView.AddChidren(btnFanText); - btnFanIcon.UnSelectedImagePath = acFunction.GetFanIconPath(m,false); + btnFanIcon.UnSelectedImagePath = acFunction.GetFanIconPath(m, false); btnFanIcon.SelectedImagePath = acFunction.GetFanIconPath(m); btnFanText.Text = acFunction.GetFanAttrText(m); @@ -701,7 +765,7 @@ { Y = Application.GetRealHeight(16), Gravity = Gravity.CenterHorizontal, - Width = Application.GetRealWidth(296+200), + Width = Application.GetRealWidth(296 + 200), }; bodyView.AddChidren(contentView); @@ -717,7 +781,8 @@ int index = 0; List<FunctionAttributes> attrList = new List<FunctionAttributes>(); attrList.AddRange(device.attributes); - attrList.Add(new FunctionAttributes() { + attrList.Add(new FunctionAttributes() + { key = "+", }); @@ -807,45 +872,45 @@ SelectedTextColor = CSS_Color.MainBackgroundColor, SelectedBackgroundColor = CSS_Color.MainColor, }; - if (attr.value.Count > 0) - { - btn.Text = attr.value[0]; - } - if (index % 3 == 1) - { - btn.Gravity = Gravity.Center; - } - else if (index % 3 == 2) - { - btn.X = Application.GetRealWidth(208); - } - row.AddChidren(btn); - - btn.MouseUpEventHandler = (sender, e) => - { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} - Dictionary<string, string> d = new Dictionary<string, string>(); - d.Add(attr.key, ""); - Control.Ins.SendWriteCommand(device, d); - - new System.Threading.Thread(() => + if (attr.value.Count > 0) { - System.Threading.Thread.Sleep(2000); - Application.RunOnMainThread(() => + btn.Text = attr.value[0]; + } + if (index % 3 == 1) + { + btn.Gravity = Gravity.Center; + } + else if (index % 3 == 2) + { + btn.X = Application.GetRealWidth(208); + } + row.AddChidren(btn); + + btn.MouseUpEventHandler = (sender, e) => + { + //if (!device.online) + //{ + // new Tip() + // { + // CloseTime = 1, + // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), + // Direction = AMPopTipDirection.None, + // }.Show(MainPage.BaseView); + //} + Dictionary<string, string> d = new Dictionary<string, string>(); + d.Add(attr.key, ""); + Control.Ins.SendWriteCommand(device, d); + + new System.Threading.Thread(() => { - btn.IsSelected = false; - }); - }) - { IsBackground = true }.Start(); - }; + System.Threading.Thread.Sleep(2000); + Application.RunOnMainThread(() => + { + btn.IsSelected = false; + }); + }) + { IsBackground = true }.Start(); + }; } @@ -870,7 +935,7 @@ if (this.device.sid != i_LocalDevice.sid) { return; } //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� - this.RefreshNowDeviceStatuMemory(i_LocalDevice); + //this.RefreshNowDeviceStatuMemory(i_LocalDevice); //鍒锋柊鐣岄潰鐘舵�� this.RefreshFormStatu(); } @@ -884,90 +949,6 @@ /// </summary> void LoadEvent_TempChange() { - btnMinus.MouseUpEventHandler = (sender, e) => - { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} - if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") - { - return; - } - - if (temp <= device.GetAttribute(FunctionAttributeKey.SetTemp).min) - { - return; - } - --temp; - Console.WriteLine($"temp == {temp}"); - controlTime = DateTime.Now; - arcBar.Progress = temp; - btnTemp.Text = temp.ToString(); - 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()); - Control.Ins.SendWriteCommand(device, d); - }; - btnPlus.MouseUpEventHandler = (sender, e) => - { - //if (!device.online) - //{ - // new Tip() - // { - // CloseTime = 1, - // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), - // Direction = AMPopTipDirection.None, - // }.Show(MainPage.BaseView); - //} - if (device.trait_on_off.curValue.ToString() == "off" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") - { - return; - } - if (temp >= device.GetAttribute(FunctionAttributeKey.SetTemp).max) - { - return; - } - ++temp; - controlTime = DateTime.Now; - arcBar.Progress = temp; - btnTemp.Text = temp.ToString(); - 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()); - Control.Ins.SendWriteCommand(device, d); - }; - //if (device.online) - { - arcBar.OnStopTrackingTouchEvent = (sender, e) => - { - temp = arcBar.Progress; - device.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); - btnTemp.Text = arcBar.Progress.ToString(); - controlTime = DateTime.Now; - 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); - }; - arcBar.OnProgressChangedEvent = (sender, e) => - { - device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString()); - btnTemp.Text = e.ToString(); - }; - //arcBar.MouseDownEventHandler = (sender, e) => { - // Console.WriteLine("ddd"); - // MainPage.BasePageView.ScrollEnabled =false; - //}; - //arcBar.MouseUpEventHandler = (sender, e) => { - // Console.WriteLine("ddd2"); - // MainPage.BasePageView.ScrollEnabled = true; - //}; - } } /// <summary> @@ -1016,15 +997,17 @@ device.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off"; if (device.trait_on_off.curValue.ToString() == "on") { - arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; btnSwitch.IsSelected = true; - arcBar.IsOffline = false; + //setTempBar.IsOffline = false; + //setTempBar.Enable = true; + //setTempBar.ProgressBarColor = CSS_Color.MainColor; } else { - arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; btnSwitch.IsBold = false; - arcBar.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()); @@ -1050,48 +1033,75 @@ } 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(",", "."))) + + acFunction.GetTempUnitString(device); btnMode.SelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); btnSwing.SelectedImagePath = acFunction.GetSwingIconPath(device.GetAttrState(FunctionAttributeKey.Swing)); btnWindSpeed.SelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed)); btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode), false); 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() ; + if (device.GetAttribute(FunctionAttributeKey.SetTemp).step == "0.5") + { + var t = Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); + var temp = (int)(t * 2); + setTempBar.Progress = temp - device.GetAttribute(FunctionAttributeKey.SetTemp).min * 2; + btnTemp.Text = Convert.ToDouble(t).ToString("0.0"); + } + else + { + var temp = Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."))); + setTempBar.Progress = temp - device.GetAttribute(FunctionAttributeKey.SetTemp).min; + btnTemp.Text = temp.ToString(); + } + +#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; - arcBar.IsOffline = false; + //setTempBar.Enable = true; + setTempBar.ProgressBarColor = CSS_Color.MainColor; + btnSwitch.IsSelected = true; - arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; - if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") - { - arcBar.IsClickable = false; - } - else - { - arcBar.IsClickable = true; - } + //if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") + //{ + // setTempBar.IsClickable = false; + //} + //else + //{ + // setTempBar.IsClickable = true; + //} + } else { btnMode.IsSelected = btnSwing.IsSelected = btnWindSpeed.IsSelected = false; - arcBar.IsOffline = true; + setTempBar.Enable = false; + setTempBar.ProgressBarColor = CSS_Color.DividingLineColor; + btnSwitch.IsSelected = false; - arcBar.IsClickable = false; - arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; + setTempBar.IsClickable = false; } - if(device.GetAttrState(FunctionAttributeKey.Mode) == "dry") + if (device.GetAttrState(FunctionAttributeKey.Mode) == "dry" || device.GetAttrState(FunctionAttributeKey.Mode) == "fan") { - arcBar.IsOffline = true; - arcBar.IsClickable = false; + setTempBar.IsOffline = true; + setTempBar.IsClickable = false; + }else + { + setTempBar.IsOffline = false; + setTempBar.IsClickable = true; } } @@ -1100,15 +1110,5 @@ #endregion - #region 鈻� 涓�鑸柟娉昣__________________________ - - /// <summary> - /// 鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� - /// </summary> - private void RefreshNowDeviceStatuMemory(Function i_LocalDevice) - { - } - - #endregion } } \ No newline at end of file -- Gitblit v1.8.0