| | |
| | | /// </summary> |
| | | FrameLayout contentView; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 后退按钮 |
| | | /// </summary> |
| | |
| | | string title; |
| | | |
| | | /// <summary> |
| | | /// 是否需要关闭页面 |
| | | /// </summary> |
| | | bool needClose = true; |
| | | |
| | | /// <summary> |
| | | /// 后退时触发对事件 |
| | | /// </summary> |
| | | Action backAction; |
| | |
| | | { |
| | | baseView = frame; |
| | | title = str; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// TopViewDiv |
| | | /// </summary> |
| | | /// <param name="frame">父控件</param> |
| | | /// <param name="title">标题</param> |
| | | /// <param name="needClose">是否需要关闭页面</param> |
| | | public TopViewDiv(FrameLayout frame, string title, bool needClose) |
| | | { |
| | | baseView = frame; |
| | | this.title = title; |
| | | this.needClose = needClose; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | }; |
| | | baseView.AddChidren(contentView); |
| | | |
| | | btnBack = new Button() |
| | | Button btnBackIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10), |
| | | Y = Application.GetRealHeight(29), |
| | |
| | | Height = Application.GetRealWidth(28), |
| | | UnSelectedImagePath = "Public/BackIcon.png", |
| | | }; |
| | | baseView.AddChidren(btnBackIcon); |
| | | |
| | | btnBack = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(50), |
| | | }; |
| | | baseView.AddChidren(btnBack); |
| | | |
| | | Button btnTilte = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(30), |
| | | Width = Application.GetRealWidth(150), |
| | | Width = Application.GetRealWidth(270), |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.HeadlineFontSize, |
| | |
| | | backAction = backAct; |
| | | |
| | | LoadTopView(); |
| | | } |
| | | |
| | | public void LoadTopView_RoomTop(Action backAction ,Action editAction) |
| | | { |
| | | this.backAction = backAction; |
| | | |
| | | LoadTopView(); |
| | | |
| | | var btnSetting = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/FuncInfoSetIcon.png", |
| | | }; |
| | | contentView.AddChidren(btnSetting); |
| | | |
| | | btnSetting.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | editAction(); |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | }; |
| | | contentView.AddChidren(btnSetting); |
| | | |
| | | btnSetting.MouseUpEventHandler += (sender, e) => |
| | | btnSetting.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var infoView = new FunctionBaseInfoSetPage(function, action); |
| | | MainPage.BasePageView.AddChidren(infoView); |