| | |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载提示弹窗 |
| | | /// </summary> |
| | | /// <param name="titleId"></param> |
| | | /// <param name="msgId"></param> |
| | | /// <param name="callBackAction"></param> |
| | | public void TipOptionMsgNotTitle(string msg, Action callBackAction, int extraHeight = 0) |
| | | { |
| | | Dialog dialog = new Dialog() |
| | | { |
| | | BackgroundColor = CSS_Color.DialogTransparentColor1, |
| | | }; |
| | | |
| | | FrameLayout contentView = new FrameLayout() |
| | | { |
| | | Gravity = Gravity.Center, |
| | | Width = Application.GetRealWidth(270), |
| | | Height = Application.GetRealHeight(140 + extraHeight), |
| | | BackgroundColor = CSS.CSS_Color.MainBackgroundColor, |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 0, |
| | | Radius = (uint)Application.GetMinRealAverage(10), |
| | | }; |
| | | dialog.AddChidren(contentView); |
| | | |
| | | Button btnMsg = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Height = Application.GetRealHeight(40 + extraHeight), |
| | | Y = Application.GetRealHeight(40), |
| | | Width = Application.GetRealHeight(200), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFF222222, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = msg, |
| | | IsMoreLines = true, |
| | | }; |
| | | contentView.AddChidren(btnMsg); |
| | | |
| | | Button btnLine = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(96 + extraHeight), |
| | | Height = Application.GetRealHeight(1), |
| | | Width = Application.GetRealWidth(270 / 2), |
| | | BackgroundColor = CSS.CSS_Color.DividingLineColor, |
| | | }; |
| | | contentView.AddChidren(btnLine); |
| | | |
| | | Button btnCancel = new Button() |
| | | { |
| | | Y = btnLine.Bottom, |
| | | Width = Application.GetRealWidth(135), |
| | | Height = Application.GetRealHeight(43), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | //SelectedTextColor = CSS_Color.MainBackgroundColor, |
| | | //SelectedBackgroundColor = CSS_Color.MainColor, |
| | | TextID = StringId.Cancel, |
| | | }; |
| | | contentView.AddChidren(btnCancel); |
| | | |
| | | |
| | | Button btnLine11 = new Button() |
| | | { |
| | | Y = btnLine.Bottom, |
| | | X = btnCancel.Right, |
| | | Width = 1, |
| | | Height = Application.GetRealHeight(43), |
| | | BackgroundColor = CSS.CSS_Color.DividingLineColor, |
| | | |
| | | }; |
| | | contentView.AddChidren(btnCancel); |
| | | |
| | | Button btnConfirm = new Button() |
| | | { |
| | | X = btnLine11.Right, |
| | | Y = btnLine.Bottom, |
| | | Width = Application.GetRealWidth(135), |
| | | Height = Application.GetRealHeight(45), |
| | | TextAlignment = TextAlignment.Center, |
| | | //TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextColor = CSS_Color.MainColor, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | TextID = StringId.Confirm, |
| | | }; |
| | | contentView.AddChidren(btnConfirm); |
| | | //例:右下圆角 大小为50 |
| | | int mRectCornerID = HDLUtils.RectCornerBottomRight; |
| | | btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID); |
| | | dialog.Show(); |
| | | |
| | | //btnCancel.MouseDownEventHandler += (sender, e) => |
| | | //{ |
| | | // btnCancel.IsSelected = true; |
| | | //}; |
| | | btnCancel.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //btnCancel.IsSelected = false; |
| | | dialog.Close(); |
| | | }; |
| | | //btnConfirm.MouseDownEventHandler += (sender, e) => |
| | | //{ |
| | | // btnConfirm.IsSelected = true; |
| | | //}; |
| | | btnConfirm.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //btnConfirm.IsSelected = false; |
| | | callBackAction(); |
| | | dialog.Close(); |
| | | }; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 信息提示窗口,自动关闭 |
| | | /// </summary> |