| | |
| | | } |
| | | this.function = FunctionList.List.GetAcstParentList()[0]; |
| | | this.BackgroundColor = CSS.CSS_Color.BackgroundColor; |
| | | this.AddChidren(new Button() { Height = Application.GetRealHeight(50), BackgroundColor = curColor }); |
| | | //this.AddChidren(new Button() { Height = Application.GetRealHeight(50), BackgroundColor = curColor }); |
| | | contentView = new VerticalScrolViewLayout() { |
| | | Height = Application.GetRealHeight(667 - 56), |
| | | }; |
| | |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var view = basePage.subViewList[temp.sid]; |
| | | if (view != null) |
| | | try |
| | | { |
| | | view.btnSubHumidityValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%"; |
| | | view.btnSubTempValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_temp.ToString()) + "°"; |
| | | view.btnSubPower.IsSelected = temp.GetAttrState(AcstSub_AttrEnum.on_off.ToString()) == "on"; |
| | | AcstSubControlView view = null; |
| | | basePage.subViewList.TryGetValue(temp.sid, out view); |
| | | if (view != null) |
| | | { |
| | | view.btnSubHumidityValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%"; |
| | | view.btnSubTempValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_temp.ToString()) + "°"; |
| | | view.btnSubPower.IsSelected = temp.GetAttrState(AcstSub_AttrEnum.on_off.ToString()) == "on"; |
| | | } |
| | | } |
| | | catch (Exception ex ) { |
| | | MainPage.Log($"科技系统更新异常1:{ex.Message}"); |
| | | } |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("科技系统更新异常11"); |
| | | MainPage.Log($"科技系统更新异常123:{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | |
| | | var btnTitleText2 = new Button() |
| | | { |
| | | X = btnCollection.Right, |
| | | Text = "我的家庭", |
| | | TextID = StringId.MyHome, |
| | | TextSize = 16, |
| | | TextColor = 0xFF242424, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | Height = Application.GetRealHeight(54), |
| | | }; |
| | | subTitleView.AddChidren(btnTitleText2); |
| | | if(Language.CurrentLanguage != "Chinese") |
| | | { |
| | | btnTitleText2.Text = "My Home"; |
| | | } |
| | | |
| | | int subFunctionCount = 0; |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | #if DEBUG |
| | | System.Threading.Thread.Sleep(200); |
| | | #endif |
| | | |
| | | foreach (var sub in FunctionList.List.GetAcstSubList()) |
| | | { |
| | | if (subViewList.ContainsKey(sub.sid)) |
| | |
| | | |
| | | AcstSubControlView subFunctionView = new AcstSubControlView(sub, subFunctionListView, imageFolder); |
| | | subViewList.Add(sub.sid, subFunctionView); |
| | | new System.Threading.Thread(() => |
| | | if (basePage != null) |
| | | { |
| | | Control.Ins.SendReadCommand(sub); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | Control.Ins.SendReadCommand(sub); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | subFunctionCount++; |
| | | }); |
| | | |