| | |
| | | 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) |
| | |
| | | temp = 16; |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | arcBar = new DiyArcSeekBar() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | |
| | | Text = Convert.ToDouble(temp).ToString(), |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5); |
| | | FrameWhiteCentet1.AddChidren(btnTemp); |
| | | |
| | | |
| | | btnTempUint = new Button() |
| | | { |
| | |
| | | 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, |
| | | }; |
| | |
| | | if (this.device.sid != i_LocalDevice.sid) { return; } |
| | | |
| | | //刷新当前设备的状态缓存 |
| | | this.RefreshNowDeviceStatuMemory(i_LocalDevice); |
| | | //this.RefreshNowDeviceStatuMemory(i_LocalDevice); |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | } |
| | |
| | | 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()); |
| | |
| | | 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()); |
| | |
| | | { |
| | | 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"); |
| | |
| | | } |
| | | 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)); |
| | |
| | | |
| | | |
| | | 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") |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 一般方法___________________________ |
| | | |
| | | /// <summary> |
| | | /// 刷新当前设备的状态缓存 |
| | | /// </summary> |
| | | private void RefreshNowDeviceStatuMemory(Function i_LocalDevice) |
| | | { |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |