| | |
| | | //this.AddChidren(new Button() { Height = Application.GetRealHeight(50), BackgroundColor = curColor }); |
| | | contentView = new VerticalScrolViewLayoutJinmao() |
| | | { |
| | | Height = Application.GetRealHeight(667 - 56), |
| | | Height = Application.GetRealHeight(667 - 56 -10), |
| | | VerticalScrollBarEnabled = false, |
| | | }; |
| | | basePage.AddChidren(contentView); |
| | |
| | | #region 头部信息区域 |
| | | FrameLayout topView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(180), |
| | | Height = Application.GetRealWidth(203), |
| | | BackgroundImagePath = $"FunctionIcon/Acst/{imageFolder}/TopViewBg.png", |
| | | }; |
| | | contentView.AddChidren(topView); |
| | | |
| | | var backView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(32), |
| | | Y = Application.GetRealWidth(56), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealHeight(34), |
| | | Height = Application.GetRealWidth(34), |
| | | }; |
| | | topView.AddChidren(backView); |
| | | |
| | |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealHeight(20), |
| | | Height = Application.GetRealWidth(20), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/BackIcon.png", |
| | | }; |
| | | backView.AddChidren(btnBackIcon); |
| | |
| | | |
| | | var btnHelloText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(25), |
| | | Y = Application.GetRealHeight(55), |
| | | X = Application.GetRealWidth(26), |
| | | Y = Application.GetRealWidth(87), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(38), |
| | | TextSize = 20, |
| | | Height = Application.GetRealWidth(24), |
| | | TextSize = 17, |
| | | Text = helloText, |
| | | TextColor = 0xFFFFFFFF, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | topView.AddChidren(btnHelloText); |
| | | |
| | | |
| | | btnOutdoorTemp = new Button() |
| | | { |
| | | X = Application.GetRealWidth(25), |
| | | Y = Application.GetRealHeight(90), |
| | | X = Application.GetRealWidth(26), |
| | | Y = Application.GetRealWidth(108), |
| | | Width = Application.GetRealWidth(85), |
| | | Height = Application.GetRealHeight(66), |
| | | Height = Application.GetRealWidth(66), |
| | | TextColor = 0xFFFFFFFF, |
| | | TextSize = 50, |
| | | TextSize = 44, |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | Text = MainPage.cityInfo.temperature + "°" |
| | | }; |
| | |
| | | |
| | | btnWeather = new Button() |
| | | { |
| | | X = btnOutdoorTemp.Right, |
| | | Y = Application.GetRealHeight(95), |
| | | X = Application.GetRealWidth(105), |
| | | Y = Application.GetRealWidth(118), |
| | | Width = Application.GetRealWidth(80), |
| | | Height = Application.GetRealHeight(26), |
| | | Height = Application.GetRealWidth(18), |
| | | Text = MainPage.cityInfo.weather, |
| | | TextColor = 0xFFFFFFFF, |
| | | TextSize = 14, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | topView.AddChidren(btnWeather); |
| | | |
| | | |
| | | var environmentalView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(150), |
| | | Height = Application.GetRealHeight(32), |
| | | Y = Application.GetRealWidth(168), |
| | | Height = Application.GetRealWidth(32), |
| | | }; |
| | | topView.AddChidren(environmentalView); |
| | | |
| | |
| | | { |
| | | X = Application.GetRealWidth(25), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | Width = Application.GetMinRealAverage(14), |
| | | Height = Application.GetMinRealAverage(14), |
| | | UnSelectedImagePath = "Public/DeviceInfoIcon/HumidityIcon.png", |
| | | }; |
| | | environmentalView.AddChidren(btnHumidityIcon); |
| | |
| | | X = btnHumidityIcon.Right + Application.GetRealWidth(4), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextColor = 0xFFFFFFFF, |
| | | TextSize = 16, |
| | | TextSize = 13, |
| | | Text = MainPage.cityInfo.humidity + "%", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | |
| | | { |
| | | X = btnHumidityValues.Right + Application.GetRealWidth(14), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | Width = Application.GetMinRealAverage(14), |
| | | Height = Application.GetMinRealAverage(14), |
| | | UnSelectedImagePath = "Public/DeviceInfoIcon/Pm25Icon.png", |
| | | }; |
| | | environmentalView.AddChidren(btnPm25Icon); |
| | |
| | | X = btnPm25Icon.Right + Application.GetRealWidth(4), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextColor = 0xFFFFFFFF, |
| | | TextSize = 16, |
| | | TextSize = 13, |
| | | Text = MainPage.cityInfo.pm25, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | |
| | | |
| | | contentView.AddChidren(new Button |
| | | { |
| | | Height = Application.GetRealHeight(8), |
| | | Height = Application.GetRealWidth(8), |
| | | }); |
| | | |
| | | #region 数据 |
| | |
| | | |
| | | var subTitleView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(54 - 11), |
| | | Height = Application.GetRealWidth(56), |
| | | }; |
| | | contentView.AddChidren(subTitleView); |
| | | |
| | | var btnCollection = new Button() |
| | | { |
| | | X = Application.GetRealWidth(6), |
| | | Y = Application.GetRealHeight(10), |
| | | Width = Application.GetRealWidth(39), |
| | | Height = Application.GetRealWidth(39), |
| | | X = Application.GetRealWidth(16), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(19), |
| | | Height = Application.GetRealWidth(19), |
| | | IsSelected = function.collect, |
| | | UnSelectedImagePath = "FunctionIcon/Acst/grey/CollectionIcon.png", |
| | | SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/CollectionIcon.png", |
| | |
| | | { |
| | | function.collect = !function.collect; |
| | | btnCollection.IsSelected = function.collect; |
| | | |
| | | //var http = new DAL.Server.HttpServerRequest(); |
| | | //http.CollectDevice(function.deviceId); |
| | | function.CollectFunction(); |
| | | |
| | | }; |
| | | |
| | | var btnTitleText2 = new Button() |
| | | { |
| | | X = btnCollection.Right, |
| | | X = btnCollection.Right + Application.GetRealWidth(6), |
| | | TextID = StringId.MyHome, |
| | | TextSize = 16, |
| | | TextColor = 0xFF242424, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | IsBold = true, |
| | | Height = Application.GetRealHeight(54), |
| | | Height = Application.GetRealWidth(38), |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | | subTitleView.AddChidren(btnTitleText2); |
| | | |
| | |
| | | |
| | | var subFunctionListView = new HorizontalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(88), |
| | | Height = Application.GetRealWidth(72), |
| | | }; |
| | | contentView.AddChidren(subFunctionListView); |
| | | contentView.AddChidren(new Button { Height = Application.GetRealWidth(16) }); |
| | | |
| | | |
| | | subFunctionListView.AddChidren(new Button { Width = Application.GetRealWidth(9) }); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | #if DEBUG |
| | | System.Threading.Thread.Sleep(200); |
| | | #endif |
| | | var showList = FunctionList.List.GetAcstSubList(); |
| | | showList.AddRange(FunctionList.List.GetWaterHeaterJinmaoList()); |
| | | foreach (var sub in showList) |
| | |
| | | { |
| | | subFunctionListView = new HorizontalScrolViewLayout() |
| | | { |
| | | Height = Application.GetRealHeight(93), |
| | | Height = Application.GetRealWidth(72), |
| | | ScrollEnabled = false, |
| | | }; |
| | | contentView.AddChidren(subFunctionListView); |
| | | subFunctionListView.AddChidren(new Button { Width = Application.GetRealWidth(9) }); |
| | | contentView.AddChidren(new Button { Height = Application.GetRealWidth(16) }); |
| | | } |
| | | |
| | | subFunctionListView.AddChidren(new Button { Width = Application.GetRealWidth(16) }); |
| | | |
| | | AcstSubControlView subFunctionView = new AcstSubControlView(sub, subFunctionListView, imageFolder); |
| | | subViewList.Add(sub.sid, subFunctionView); |
| | | |
| | | if (basePage != null) |
| | | { |
| | | new System.Threading.Thread(() => |
| | |
| | | }).Start(); |
| | | #endregion |
| | | |
| | | |
| | | #region 底部控制栏 |
| | | var bottomView = new FrameLayout() |
| | | { |
| | |
| | | btnModeControl = new Button() |
| | | { |
| | | X = Application.GetRealWidth(89), |
| | | Gravity = Gravity.CenterVertical, |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(38), |
| | | Height = Application.GetRealWidth(38), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/grey/ModeCoolIcon2.png", |
| | |
| | | |
| | | btnPowerControl = new Button() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(38), |
| | | Height = Application.GetRealWidth(38), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/grey/PowerOffIcon.png", |
| | |
| | | |
| | | btnWorkSceneControl = new Button() |
| | | { |
| | | Gravity = Gravity.CenterVertical, |
| | | Y = Application.GetRealWidth(16), |
| | | X = Application.GetRealWidth(249), |
| | | Width = Application.GetRealWidth(38), |
| | | Height = Application.GetRealWidth(38), |
| | |
| | | |
| | | var subFunctionView = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(177), |
| | | Height = Application.GetRealHeight(93), |
| | | BackgroundImagePath = "FunctionIcon/Acst/grey/BgSubControlView.png", |
| | | Width = Application.GetRealWidth(163), |
| | | Height = Application.GetRealWidth(72), |
| | | Radius = (uint)Application.GetRealWidth(6), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = (uint)Application.GetRealWidth(1), |
| | | BackgroundColor = CSS.CSS_Color.MainBackgroundColor, |
| | | //BackgroundImagePath = "FunctionIcon/Acst/grey/BgSubControlView.png", |
| | | }; |
| | | subFunctionListView.AddChidren(subFunctionView); |
| | | |
| | | var btnRoomInfo = new Button() |
| | | { |
| | | X = Application.GetRealWidth(18 + 7), |
| | | Y = Application.GetRealHeight(11), |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(40), |
| | | Height = Application.GetRealWidth(44), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = 0xFF1b3053, |
| | | TextSize = 13, |
| | | TextSize = 14, |
| | | Text = sub.name, |
| | | }; |
| | | subFunctionView.AddChidren(btnRoomInfo); |
| | | |
| | | var btnSubTempIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16 + 7), |
| | | Y = Application.GetRealHeight(47 + 11), |
| | | Width = Application.GetMinRealAverage(11), |
| | | Height = Application.GetMinRealAverage(11), |
| | | X = Application.GetRealWidth(13), |
| | | Y = Application.GetRealWidth(48), |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealWidth(12), |
| | | UnSelectedImagePath = "FunctionIcon/CAC/HvacCacTempIcon.png", |
| | | }; |
| | | subFunctionView.AddChidren(btnSubTempIcon); |
| | |
| | | btnSubTempValues = new TextButton() |
| | | { |
| | | X = btnSubTempIcon.Right, |
| | | Y = Application.GetRealHeight(45 + 11), |
| | | Height = Application.GetRealHeight(14), |
| | | Y = Application.GetRealWidth(46), |
| | | Height = Application.GetRealWidth(15), |
| | | Width = Application.GetRealWidth(35), |
| | | TextColor = 0xFF1b3035, |
| | | TextSize = 10, |
| | | TextSize = 11, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | subFunctionView.AddChidren(btnSubTempValues); |
| | | |
| | | btnSubPower = new Button() |
| | | { |
| | | X = Application.GetRealWidth(121 + 7), |
| | | X = Application.GetRealWidth(120), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(28), |
| | | Height = Application.GetRealWidth(28), |
| | | Width = Application.GetRealWidth(29), |
| | | Height = Application.GetRealWidth(29), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/grey/PowerOffIcon.png", |
| | | SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/PowerIcon.png", |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | Button btnSubHumidityIcon = new Button() |
| | | { |
| | | X = btnSubTempValues.Right + Application.GetRealWidth(5), |
| | | Y = Application.GetRealHeight(47 + 11), |
| | | Width = Application.GetMinRealAverage(11), |
| | | Height = Application.GetMinRealAverage(11), |
| | | Y = Application.GetRealWidth(48), |
| | | Width = Application.GetRealWidth(12), |
| | | Height = Application.GetRealWidth(12), |
| | | UnSelectedImagePath = "FunctionIcon/CAC/HvacCacHumidityIcon.png", |
| | | }; |
| | | subFunctionView.AddChidren(btnSubHumidityIcon); |
| | |
| | | btnSubHumidityValues = new TextButton() |
| | | { |
| | | X = btnSubHumidityIcon.Right, |
| | | Y = Application.GetRealHeight(45 + 11), |
| | | Height = Application.GetRealHeight(14), |
| | | Y = Application.GetRealWidth(46), |
| | | Height = Application.GetRealWidth(15), |
| | | Width = Application.GetRealWidth(35), |
| | | TextColor = 0xFF1b3053, |
| | | TextSize = 10, |