| | |
| | | /// </summary> |
| | | public class OperationResultDisPalyPage : Dialog |
| | | { |
| | | Dialog bodyView; |
| | | Dialog dialog; |
| | | FrameLayout bodyView; |
| | | public OperationResultDisPalyPage() |
| | | { |
| | | bodyView = this; |
| | | dialog = this; |
| | | bodyView = new FrameLayout(); |
| | | } |
| | | |
| | | public void LoadPage(bool result) |
| | | /// <summary> |
| | | /// 操作结果显示页面 |
| | | /// </summary> |
| | | /// <param name="result">操作结果</param> |
| | | /// <param name="title">页面标题</param> |
| | | /// <param name="tipTitle">提示标题</param> |
| | | /// <param name="tipMsg">提示信息</param> |
| | | public void LoadPage(bool result,string title,string tipTitle,string tipMsg) |
| | | { |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | string title = result ? Language.StringByID(StringId.SetSuccessfully) : Language.StringByID(StringId.SetSuccessfully); |
| | | new TopViewDiv(bodyView, MainPage.BaseView, title); |
| | | dialog.AddChidren(bodyView); |
| | | |
| | | new TopViewDiv(dialog,bodyView, title).LoadTopView() ; |
| | | |
| | | Button btnTipIcon = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(96), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(180), |
| | | Height = Application.GetRealWidth(180), |
| | | UnSelectedImagePath = result ? "Public/TipIcon_Successfully.png" : "Public/TipIcon_Failed.png", |
| | | }; |
| | | bodyView.AddChidren(btnTipIcon); |
| | | |
| | | Button btnTipTitle = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(288), |
| | | Height = Application.GetRealHeight(30), |
| | | TextColor = result ? CSS_Color.MainColor : CSS_Color.WarningColor, |
| | | Text = tipTitle, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | }; |
| | | bodyView.AddChidren(btnTipTitle); |
| | | |
| | | Button btnTipMsg = new Button() |
| | | { |
| | | Y = btnTipTitle.Bottom, |
| | | Height = Application.GetRealHeight(25), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | Text = tipMsg, |
| | | }; |
| | | bodyView.AddChidren(btnTipMsg); |
| | | |
| | | Button btnConfirm = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(401), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(44), |
| | | Radius = (uint)Application.GetRealHeight(22), |
| | | BackgroundColor = CSS_Color.MainColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextID = StringId.Confirm |
| | | }; |
| | | bodyView.AddChidren(btnConfirm); |
| | | btnConfirm.MouseUpEventHandler = (sender, e) => { |
| | | this.Close(); |
| | | }; |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 附加操作 |
| | | /// </summary> |
| | | public void AdditionalOperations(string msg,Action<bool> action) |
| | | { |
| | | Button btnCheckIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(78), |
| | | Y = Application.GetRealHeight(350), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "Public/ChooseIcon.png", |
| | | SelectedImagePath = "Public/ChooseOnIcon.png", |
| | | }; |
| | | bodyView.AddChidren(btnCheckIcon); |
| | | |
| | | Button btnMsg = new Button() |
| | | { |
| | | X = btnCheckIcon.Right, |
| | | Y = Application.GetRealHeight(350), |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealHeight(32), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = msg, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | bodyView.AddChidren(btnMsg); |
| | | |
| | | btnCheckIcon.MouseUpEventHandler = (sender, e) => { |
| | | btnCheckIcon.IsSelected = !btnCheckIcon.IsSelected; |
| | | action(btnCheckIcon.IsSelected); |
| | | }; |
| | | btnMsg.MouseUpEventHandler = (sender, e) =>{ |
| | | btnCheckIcon.IsSelected = !btnCheckIcon.IsSelected; |
| | | action(btnCheckIcon.IsSelected); |
| | | }; |
| | | } |
| | | } |
| | | } |