| | |
| | | /// </summary>
|
| | | public bool ClickBackClose = true;
|
| | | /// <summary>
|
| | | /// 点击确认时关闭界面(有些界面特殊,不关闭)
|
| | | /// </summary>
|
| | | public bool ClickConfirmClose = true;
|
| | | /// <summary>
|
| | | /// 整个弹窗对象
|
| | | /// </summary>
|
| | | private Dialog FrameDialog = null;
|
| | |
| | | /// <summary>
|
| | | /// 初始化底层控件(返回的是四周有圆角的白色区域控件),此方法由封装控件底层调用,请勿随便调用
|
| | | /// </summary>
|
| | | public NormalFrameLayout InitBaseControl()
|
| | | /// <param name="i_whiteWidth">白色区域的宽度,最好不要改这个东西</param>
|
| | | /// <param name="real">是否计算真实值</param>
|
| | | /// <returns></returns>
|
| | | public NormalFrameLayout InitBaseControl(int i_whiteWidth = 343, bool real = true)
|
| | | {
|
| | | //整个灰色界面
|
| | | this.FrameDialog?.Close();
|
| | |
| | | }
|
| | | };
|
| | |
|
| | | //白色背景
|
| | | //标题高度
|
| | | int titleHeight = Application.GetRealHeight(50);
|
| | |
|
| | | //白色背景(样子悬浮于界面,四个角都是圆角)
|
| | | var frameWhiteBack = new NormalFrameLayout();
|
| | | frameWhiteBack.Width = Application.GetRealWidth(343);
|
| | | frameWhiteBack.Height = RowHeight * (RowCount + 1);
|
| | | frameWhiteBack.Width = real == true ? Application.GetRealWidth(i_whiteWidth) : i_whiteWidth;
|
| | | frameWhiteBack.Height = RowHeight * RowCount + titleHeight;
|
| | | frameWhiteBack.Radius = (uint)Application.GetRealWidth(12);
|
| | | frameWhiteBack.Gravity = Gravity.CenterHorizontal;
|
| | | frameWhiteBack.Y = dialogBody.Height - RowHeight * (RowCount + 1) - Application.GetRealHeight(20);
|
| | | //它的底部有个20的间距
|
| | | frameWhiteBack.Y = dialogBody.Height - RowHeight * RowCount - titleHeight - Application.GetRealHeight(20);
|
| | | frameWhiteBack.BackgroundColor = CSS_Color.MainBackgroundColor;
|
| | | dialogBody.AddChidren(frameWhiteBack);
|
| | |
|
| | |
| | | btnCancel.TextColor = CSS_Color.PromptingColor1;
|
| | | btnCancel.TextID = StringId.Cancel;
|
| | | btnCancel.TextSize = CSS_FontSize.TextFontSize;
|
| | | btnCancel.Width = btnCancel.GetRealWidthByText();
|
| | | frameWhiteBack.AddChidren(btnCancel);
|
| | |
|
| | | //标题
|
| | |
| | |
|
| | | //确认
|
| | | this.btnConfirm = new NormalViewControl(90, 48, true);
|
| | | btnConfirm.X = frameWhiteBack.Width - Application.GetRealWidth(90) - btnCancel.X;
|
| | | btnConfirm.Y = btnCancel.Y;
|
| | | btnConfirm.TextAlignment = TextAlignment.CenterRight;
|
| | | btnConfirm.TextColor = CSS_Color.MainColor;
|
| | | btnConfirm.TextID = StringId.Confirm;
|
| | | btnConfirm.TextSize = CSS_FontSize.TextFontSize;
|
| | | btnConfirm.Width = btnConfirm.GetRealWidthByText();
|
| | | frameWhiteBack.AddChidren(btnConfirm);
|
| | | btnConfirm.X = frameWhiteBack.Width - btnConfirm.Width - btnCancel.X;
|
| | |
|
| | | FrameDialog.Show();
|
| | |
|