| | |
| | | public void Show(string Name) |
| | | { |
| | | #region 上面的布局代码 |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | UserView.HomePage.Instance.ScrollEnabled = false;//锁住左滑 |
| | | this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor; |
| | | TopView view = new TopView(); |
| | | this.AddChidren(view.TopRowView(true)); |
| | | view.toptitleNameBtn.Text = Name; |
| | | view.clickBtn.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | UserView.HomePage.Instance.ScrollEnabled = true; |
| | | UserView.HomePage.Instance.ScrollEnabled = true;//恢复左滑 |
| | | RemoveFromParent(); |
| | | }; |
| | | view.foolrnameBtn.Text = Config.Instance.Home.GetCurrentFloorName; |
| | |
| | | |
| | | var btnfoolricon = new Button |
| | | { |
| | | Width = Application.GetRealWidth(81), |
| | | Height = Application.GetRealHeight(81), |
| | | Width = Application.GetMinRealAverage(81), |
| | | Height = Application.GetMinRealAverage(81), |
| | | UnSelectedImagePath = "Floor/Floor.png", |
| | | Gravity = Gravity.CenterVertical, |
| | | }; |
| | |
| | | /// <param name="devicelist">Devicelist.</param> |
| | | void AllDeviceTypeView(List<CommonDevice> devicelist) |
| | | { |
| | | var devicetypelist = Method.GetDeviceTypeList(IfType, devicelist); |
| | | var devicetypelist = Method.GetDeviceTypeList(devicelist); |
| | | devicetypehorizontalScrol.RemoveAll(); |
| | | for (int i = 0; i < devicetypelist.Count; i++) |
| | | { |
| | |
| | | |
| | | var devicetypeicon = new Button |
| | | { |
| | | Width = Application.GetRealWidth(84), |
| | | Height = Application.GetRealHeight(84), |
| | | Width = Application.GetMinRealAverage(84), |
| | | Height = Application.GetMinRealAverage(84), |
| | | X = Application.GetRealWidth(46), |
| | | Y = Application.GetRealHeight(30), |
| | | UnSelectedImagePath =Method.GetDeviceTypeIcon(devicetype), |
| | |
| | | middle.AddChidren(deviceFramelayout); |
| | | var bjFramelayout = new FrameLayout |
| | | { |
| | | Width = Application.GetRealWidth(112), |
| | | Height = Application.GetRealHeight(112), |
| | | Width = Application.GetMinRealAverage(112), |
| | | Height = Application.GetMinRealAverage(112), |
| | | X = Application.GetRealWidth(58), |
| | | Y = Application.GetRealHeight(30 + 9), |
| | | // Radius = (uint)Application.GetRealHeight(56), |
| | |
| | | deviceFramelayout.AddChidren(bjFramelayout); |
| | | var deviceIconBtn = new Button |
| | | { |
| | | Width = Application.GetRealWidth(82), |
| | | Height = Application.GetRealHeight(82), |
| | | Width = Application.GetMinRealAverage(82), |
| | | Height = Application.GetMinRealAverage(82), |
| | | Gravity = Gravity.Center, |
| | | }; |
| | | bjFramelayout.AddChidren(deviceIconBtn); |