//using System; //using Shared; //using HDL_ON.Entity; //using HDL_ON.UI.CSS; //namespace HDL_ON.UI //{ // public class AddCombineDimmingPage : FrameLayout // { // FrameLayout bodyView; // GroupControl groupControl; // public AddCombineDimmingPage() // { // bodyView = this; // groupControl = new GroupControl(); // } // public void LoadPage() // { // new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView(); // var contentView = new FrameLayout() // { // Y = Application.GetRealHeight(64), // BackgroundColor = CSS_Color.MainBackgroundColor, // Height = Application.GetRealHeight(550), // }; // bodyView.AddChidren(contentView); // #region 组名称 // FrameLayout groupNameView; // groupNameView = new FrameLayout() // { // Height = Application.GetRealHeight(50), // BackgroundColor = CSS_Color.MainBackgroundColor, // }; // contentView.AddChidren(groupNameView); // Button btnGroupNameTitle = new Button() // { // X = Application.GetRealWidth(16), // Width = Application.GetRealWidth(78), // TextID = StringId.GroupNmae, // TextAlignment = TextAlignment.CenterLeft, // TextSize = CSS_FontSize.SubheadingFontSize, // TextColor = CSS_Color.FirstLevelTitleColor, // }; // groupNameView.AddChidren(btnGroupNameTitle); // var btnGroupName = new EditText() // { // X = Application.GetRealWidth(155), // Width = Application.GetRealWidth(200), // PlaceholderText =Language.StringByID( StringId.PlsEntry), // TextSize = CSS_FontSize.TextFontSize, // TextAlignment = TextAlignment.CenterRight, // TextColor = CSS_Color.TextualColor, // }; // groupNameView.AddChidren(btnGroupName); // groupNameView.AddChidren( // new Button() // { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(49), // Height = Application.GetRealHeight(1), // Width = Application.GetRealWidth(343), // BackgroundColor = CSS_Color.DividingLineColor, // }); // #endregion // #region 位置管理 // var locationMagtView = new FrameLayout() // { // Height = Application.GetRealHeight(55), // BackgroundColor = CSS_Color.MainBackgroundColor, // }; // contentView.AddChidren(locationMagtView); // var btnLocationMagtTitle = new Button() // { // X = Application.GetRealWidth(16), // Width = Application.GetRealWidth(160), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.FirstLevelTitleColor, // TextSize = CSS_FontSize.SubheadingFontSize, // TextID = StringId.LocationManagement, // }; // locationMagtView.AddChidren(btnLocationMagtTitle); // var btnLocationValues = new Button() // { // X = Application.GetRealWidth(86), // Width = Application.GetRealWidth(237), // TextAlignment = TextAlignment.CenterRight, // TextColor = CSS_Color.PromptingColor1, // TextSize = CSS_FontSize.TextFontSize, // Text = groupControl.GetRoomListName(), // }; // locationMagtView.AddChidren(btnLocationValues); // var btnLocationInfoRight = new Button() // { // X = Application.GetRealWidth(339), // Gravity = Gravity.CenterVertical, // Width = Application.GetMinRealAverage(16), // Height = Application.GetMinRealAverage(16), // UnSelectedImagePath = "Public/RightIcon.png", // }; // locationMagtView.AddChidren(btnLocationInfoRight); // EventHandler eventHandler = (sender, e) => // { // //修改功能所属房间之后的回调事件 // Action chooseRoomBackAction = () => { // try // { // btnLocationValues.Text = groupControl.GetRoomListName(); // } // catch { } // }; // var view = new GroupChooseRoomPage(groupControl, chooseRoomBackAction); // MainPage.BasePageView.AddChidren(view); // view.LoadPage(); // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; // }; // if (btnLocationInfoRight != null) // { // btnLocationInfoRight.MouseUpEventHandler = eventHandler; // } // if (btnLocationValues != null) // { // btnLocationValues.MouseUpEventHandler = eventHandler; // } // locationMagtView.AddChidren( // new Button() // { // Gravity = Gravity.CenterHorizontal, // BackgroundColor = CSS_Color.DividingLineColor, // Width = Application.GetRealWidth(343), // Height = Application.GetRealHeight(1) // }); // #endregion // #region 设备选择 // contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); // var chooseFunctionTitleView = new FrameLayout() // { // Height = Application.GetRealHeight(44), // BackgroundColor = CSS_Color.MainBackgroundColor, // }; // contentView.AddChidren(chooseFunctionTitleView); // contentView.AddChidren( // new Button() // { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(49), // Height = Application.GetRealHeight(1), // Width = Application.GetRealWidth(343), // BackgroundColor = CSS_Color.DividingLineColor, // }); // var btnChooseFunctionTitle = new Button() // { // X = Application.GetRealWidth(16), // TextAlignment = TextAlignment.CenterLeft, // TextColor = CSS_Color.MainColor, // TextSize = CSS_FontSize.SubheadingFontSize, // IsBold = true, // TextID = StringId.SelectGroupControlFunction, // }; // chooseFunctionTitleView.AddChidren(btnChooseFunctionTitle); // var deviceListView = new VerticalScrolViewLayout() // { // Height = Application.GetRealHeight(387), // }; // contentView.AddChidren(deviceListView); // foreach(var function in FunctionList.List.GetLightList()) // { // var functionRow = new FrameLayout() // { // Height = Application.GetRealHeight(65), // BackgroundColor = CSS_Color.MainBackgroundColor, // }; // deviceListView.AddChidren(functionRow); // var btnFunctionName = new Button() // { // X = Application.GetRealWidth(16), // Y = Application.GetRealHeight(10), // Width = Application.GetRealWidth(308), // Height = Application.GetRealHeight(24), // TextAlignment = TextAlignment.CenterLeft, // TextSize = CSS_FontSize.SubheadingFontSize, // TextColor = CSS_Color.FirstLevelTitleColor, // Text = function.name, // }; // functionRow.AddChidren(btnFunctionName); // var btnFunctionLocationInfo = new Button() // { // X = Application.GetRealWidth(16), // Y = btnFunctionName.Bottom, // Width = Application.GetRealWidth(308), // Height = Application.GetRealHeight(21), // TextAlignment = TextAlignment.CenterLeft, // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, // TextColor = CSS_Color.PromptingColor1, // Text = function.GetRoomListName(), // }; // functionRow.AddChidren(btnFunctionLocationInfo); // } // #endregion // #region 底部确认按钮 // var bottomView = new FrameLayout() // { // Y = Application.GetRealHeight(591), // Height = Application.GetRealHeight(106), // BackgroundColor = CSS_Color.MainBackgroundColor, // Radius = (uint)Application.GetRealWidth(16), // }; // bodyView.AddChidren(bottomView); // var btnConfrim = new Button() // { // Gravity = Gravity.CenterHorizontal, // Y = Application.GetRealHeight(12), // Width = Application.GetRealWidth(220), // Height = Application.GetRealWidth(44), // TextAlignment = TextAlignment.Center, // TextColor = CSS_Color.MainBackgroundColor, // BackgroundColor = CSS_Color.MainColor, // TextSize = CSS_FontSize.SubheadingFontSize, // IsBold = true, // Radius = (uint)Application.GetRealWidth(22), // TextID = StringId.Complete // }; // bottomView.AddChidren(btnConfrim); // btnConfrim.MouseUpEventHandler = (sender, e) => // { // }; // #endregion // } // } //}