| | |
| | | { |
| | | #region 控件列表 |
| | | FrameLayout bodyView; |
| | | |
| | | /// <summary> |
| | | /// 功能名称显示按钮 |
| | | /// </summary> |
| | | Button btnFunctionName; |
| | | /// <summary> |
| | | /// 功能名称编辑按钮 |
| | | /// </summary> |
| | | Button btnEditName; |
| | | /// <summary> |
| | | /// 位置信息显示按钮 |
| | | /// </summary> |
| | | Button btnLocationValues; |
| | | /// <summary> |
| | | /// 位置信息跳转编辑按钮 |
| | | /// </summary> |
| | | Button btnLocationInfoRight; |
| | | |
| | | #endregion |
| | | |
| | | #region 局部变量 |
| | | Function function; |
| | | /// <summary> |
| | | /// 后退时,刷新之前界面的显示信息 |
| | | /// </summary> |
| | | Action actionRefresh; |
| | | #endregion |
| | | |
| | | public FunctionBaseInfoSetPage(Function func) |
| | | public FunctionBaseInfoSetPage(Function func,Action action) |
| | | { |
| | | bodyView = this; |
| | | function = func; |
| | | actionRefresh = action; |
| | | } |
| | | /// <summary> |
| | | /// 加载界面 |
| | |
| | | public void LoadPage() |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | new PublicAssmebly().LoadTopView(bodyView, Language.StringByID(StringId.Setting)); |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView(actionRefresh); |
| | | |
| | | #region name view |
| | | var nameView = new FrameLayout() |
| | |
| | | }; |
| | | nameView.AddChidren(btnNameText); |
| | | |
| | | var btnNameValues = new Button() |
| | | btnFunctionName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(186), |
| | | Width = Application.GetRealWidth(137), |
| | |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = function.name, |
| | | }; |
| | | nameView.AddChidren(btnNameValues); |
| | | nameView.AddChidren(btnFunctionName); |
| | | |
| | | var btnEditName = new Button() |
| | | btnEditName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(333), |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | Height = Application.GetRealHeight(1) |
| | | }); |
| | | |
| | | btnEditName.MouseUpEventHandler += (sender, e) => { |
| | | //创建回调事件 |
| | | Action<string> callBackAction = (name) => |
| | | { |
| | | function.name = name; |
| | | DB_ResidenceData.residenceData.SaveResidenceData(); |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, function.name, callBackAction); |
| | | }; |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region 位置管理 |
| | |
| | | }; |
| | | bodyView.AddChidren(locationMagtView); |
| | | |
| | | var btnLocationMagtText = new Button() |
| | | var btnLocationMagtTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(160), |
| | |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.LocationManagement, |
| | | }; |
| | | locationMagtView.AddChidren(btnLocationMagtText); |
| | | locationMagtView.AddChidren(btnLocationMagtTitle); |
| | | |
| | | var btnLocationValues = new Button() |
| | | btnLocationValues = new Button() |
| | | { |
| | | X = Application.GetRealWidth(186), |
| | | Width = Application.GetRealWidth(137), |
| | |
| | | }; |
| | | locationMagtView.AddChidren(btnLocationValues); |
| | | |
| | | var btnLocationMagtRight = new Button() |
| | | btnLocationInfoRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/RightIcon.png", |
| | | }; |
| | | locationMagtView.AddChidren(btnLocationMagtRight); |
| | | locationMagtView.AddChidren(btnLocationInfoRight); |
| | | |
| | | locationMagtView.AddChidren( |
| | | new Button() |
| | |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(1) |
| | | }); |
| | | btnLocationMagtRight.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | SkipChooseRoomPage(); |
| | | }; |
| | | #endregion |
| | | |
| | | #region 共享 |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | LoadEventList(); |
| | | } |
| | | |
| | | |