| | |
| | | bodyView.btnTemp.Text = outinTemp.ToString(); |
| | | bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C"; |
| | | bodyView.btnMode.SelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode)); |
| | | bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode),false); |
| | | bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode), false); |
| | | bodyView.arcBar.Progress = outinTemp; |
| | | //if (updateTemp.trait_on_off.curValue.ToString() == "on") |
| | | //{ |
| | |
| | | bodyView.arcBar.IsClickable = false; |
| | | bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | } |
| | | //自动模式不允许调温度 2021-10-27 09:41:35 wxr 陈琳反馈 |
| | | if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "auto"|| updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "timer") |
| | | { |
| | | bodyView.btnPlus.Enable = false; |
| | | bodyView.btnMinus.Enable = false; |
| | | bodyView.arcBar.IsClickable = false; |
| | | bodyView.arcBar.IsOffline = true; |
| | | } |
| | | |
| | | ////自动模式不允许调温度 2021-10-27 09:41:35 wxr 陈琳反馈 |
| | | //if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "auto" || updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "timer") |
| | | //{ |
| | | // bodyView.btnPlus.Enable = false; |
| | | // bodyView.btnMinus.Enable = false; |
| | | // bodyView.arcBar.IsClickable = false; |
| | | // bodyView.arcBar.IsOffline = true; |
| | | //} |
| | | //更新不同界面状态 2022年06月09日19:22:55 wjc 修改 |
| | | bodyView.updateStatusPage(); |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName(); |
| | | //function.SaveFunctionData(true); |
| | | }; |
| | | //自动模式不允许调温度 2021-10-27 09:41:35 wxr 陈琳反馈 |
| | | if (function.GetAttrState(FunctionAttributeKey.Mode) == "auto" || function.GetAttrState(FunctionAttributeKey.Mode) == "timer") |
| | | { |
| | | btnPlus.Enable = false; |
| | | btnMinus.Enable = false; |
| | | arcBar.IsClickable = false; |
| | | arcBar.IsOffline = true; |
| | | } |
| | | |
| | | ////自动模式不允许调温度 2021-10-27 09:41:35 wxr 陈琳反馈 |
| | | //if (function.GetAttrState(FunctionAttributeKey.Mode) == "auto" || function.GetAttrState(FunctionAttributeKey.Mode) == "timer") |
| | | //{ |
| | | // btnPlus.Enable = false; |
| | | // btnMinus.Enable = false; |
| | | // arcBar.IsClickable = false; |
| | | // arcBar.IsOffline = true; |
| | | //} |
| | | //初始化不同界面状态 2022年06月09日19:22:55 wjc 修改 |
| | | this.updateStatusPage(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | //} |
| | | btnMinus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if(function.trait_on_off.curValue.ToString() == "off") |
| | | if (function.trait_on_off.curValue.ToString() == "off") |
| | | { |
| | | return; |
| | | } |
| | |
| | | { |
| | | return; |
| | | } |
| | | var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); |
| | | var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); |
| | | if (temp >= Convert.ToDouble(function.GetAttribute(FunctionAttributeKey.SetTemp).max)) |
| | | { |
| | | return; |
| | |
| | | }; |
| | | arcBar.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.SetTemp,arcBar.Progress); |
| | | function.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress); |
| | | btnTemp.Text = arcBar.Progress.ToString(); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString()); |
| | |
| | | arcBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.SetTemp, e); |
| | | btnTemp.Text = Convert.ToDouble( function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(); |
| | | btnTemp.Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(); |
| | | }; |
| | | } |
| | | /// <summary> |
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(function, d); |
| | | |
| | | |
| | | }; |
| | | } |
| | | |
| | |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | btn1.IsSelected = btn2.IsSelected = true; |
| | | function.SetAttrState(FunctionAttributeKey.Mode,curMode); |
| | | function.SetAttrState(FunctionAttributeKey.Mode, curMode); |
| | | btnMode.UnSelectedImagePath = btn1.SelectedImagePath; |
| | | //byte pro = 6;//不处理温度显示,等待回复数据再处理 |
| | | //function.Fh_Mode_Temp.TryGetValue(curMode, out pro); |
| | |
| | | btn2.MouseUpEventHandler = eventHandler1; |
| | | dialogView.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新不同界面状态 |
| | | /// </summary> |
| | | private void updateStatusPage() |
| | | { |
| | | btnPlus.Enable = true; |
| | | btnMinus.Enable = true; |
| | | arcBar.IsClickable = true; |
| | | arcBar.IsOffline = false; |
| | | switch (getModeValue) |
| | | { |
| | | case "auto"://自动 |
| | | case "timer":// |
| | | btnPlus.Enable = false; |
| | | btnMinus.Enable = false; |
| | | arcBar.IsClickable = false; |
| | | arcBar.IsOffline = true; |
| | | break; |
| | | |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 获取模式value值 |
| | | /// </summary> |
| | | private string getModeValue |
| | | { |
| | | get |
| | | { |
| | | return function.GetAttrState(FunctionAttributeKey.Mode); |
| | | } |
| | | } |
| | | } |
| | | } |