| | |
| | | using System; |
| | | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | |
| | |
| | | { |
| | | /// <summary> |
| | | /// 通用二次确认界面 |
| | | /// 可以自定义按钮文字 |
| | | /// 可以自定义按钮文字、提示内容支持多行显示 |
| | | /// </summary> |
| | | public class ConfirmDialog : Dialog |
| | | { |
| | |
| | | /// </summary> |
| | | public ConfirmDialog() |
| | | { |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | Button btnTitle = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(16), |
| | | Height = Application.GetRealHeight(30), |
| | | Y = Application.GetRealHeight(20), |
| | | Height = Application.GetRealHeight(22), |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | Text = titleStr, |
| | | }; |
| | | contentView.AddChidren(btnTitle); |
| | | |
| | | int Width135 = Application.GetRealWidth(135); |
| | | //提示内容按钮 |
| | | Button btnMsg = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Height = Application.GetRealHeight(25), |
| | | Y = btnTitle.Bottom, |
| | | Width = Application.GetRealHeight(200), |
| | | Y = btnTitle.Bottom + Application.GetRealHeight(4), |
| | | X = Application.GetRealWidth(6), |
| | | Height = Application.GetRealHeight(46), |
| | | Width = Application.GetRealWidth(258), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | Text = msgStr, |
| | | IsMoreLines = true, |
| | | }; |
| | | contentView.AddChidren(btnMsg); |
| | | |
| | |
| | | Button btnCancel = new Button() |
| | | { |
| | | Y = btnLine.Bottom, |
| | | Width = Application.GetRealWidth(135), |
| | | Width = Width135, |
| | | Height = Application.GetRealHeight(43), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | |
| | | |
| | | Button btnConfirm = new Button() |
| | | { |
| | | X = btnCancel.Right, |
| | | X = contentView.Width - Width135, |
| | | Y = btnLine.Y, |
| | | Width = Application.GetRealWidth(135), |
| | | Width = Width135, |
| | | Height = Application.GetRealHeight(45), |
| | | TextAlignment = TextAlignment.Center, |
| | | //TextColor = CSS_Color.TextualColor, |