| | |
| | | { |
| | | return; |
| | | } |
| | | bodyView.arcBar.ProgressBarColor = bodyView.fh.on_off == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | bodyView.arcBar.ProgressBarColor = bodyView.fh.trait_on_off.value.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | bodyView.btnTemp.Text = uFh.curTemp.ToString(); |
| | | bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + uFh.indoorTemp + "°C"; |
| | | bodyView.btnMode.UnSelectedImagePath = uFh.curModeImage; |
| | | bodyView.btnSwitch.IsSelected = uFh.on_off == "on"; |
| | | bodyView.btnSwitch.IsSelected = uFh.trait_on_off.value.ToString() == "on"; |
| | | if (uFh.refreshTime.AddMilliseconds(1000) < DateTime.Now) |
| | | { |
| | | bodyView.arcBar.Progress = uFh.curTemp; |
| | | bodyView.arcBar.Progress = (int)uFh.curTemp; |
| | | } |
| | | }); |
| | | } |
| | |
| | | btnCollection.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | btnCollection.IsSelected = fh.collection = btnCollection_Out.IsSelected = !btnCollection.IsSelected; |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | fh.SaveFunctionData(); |
| | | }; |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | fh.curTemp--; |
| | | arcBar.Progress = fh.curTemp; |
| | | arcBar.Progress = (int)fh.curTemp; |
| | | btnTemp.Text = fh.curTemp.ToString(); |
| | | //Control.Send(CommandType_A.write, fh); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | |
| | | return; |
| | | } |
| | | fh.curTemp++; |
| | | arcBar.Progress = fh.curTemp; |
| | | arcBar.Progress = (int)fh.curTemp; |
| | | btnTemp.Text = fh.curTemp.ToString(); |
| | | //Control.Send(CommandType_A.write, fh); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | |
| | | btnSwitch.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected; |
| | | fh.on_off = btnSwitch.IsSelected ? "on" : "off"; |
| | | fh.trait_on_off.value = btnSwitch.IsSelected ? "on" : "off"; |
| | | //Control.Send(CommandType_A.write, fh); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", fh.on_off.ToString()); |
| | | d.Add("on_off", fh.trait_on_off.value.ToString()); |
| | | Control.SendWriteCommand(fh, d); |
| | | }; |
| | | } |
| | |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | btn1.IsSelected = btn2.IsSelected = true; |
| | | fh.curMode = curMode; |
| | | fh.trait_mode.value = curMode; |
| | | //Control.Send(CommandType_A.write, fh); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("mode", fh.curModeIndex.ToString()); |