| | |
| | | /// <summary> |
| | | /// 大框圆角值 |
| | | /// </summary> |
| | | public int RradiusFrameLayout = 15; |
| | | private int RradiusFrameLayout = 15; |
| | | /// <summary> |
| | | /// 小框圆角值 |
| | | /// </summary> |
| | | public int radiusEditFrameLayout = 4; |
| | | private int radiusEditFrameLayout = 4; |
| | | /// <summary> |
| | | /// 输入框 |
| | | /// </summary> |
| | |
| | | /// <param name="titleId">标题文本</param> |
| | | /// <param name="tnputEditTxet">显示文本</param> |
| | | /// <param name="confirmAction">回调函数</param> |
| | | public void InputBox(int titleId, string tnputEditTxet, Action<string> confirmAction) |
| | | /// <param name="minValue">最小值</param> |
| | | /// <param name="maxValue">最大值</param> |
| | | public void InputBox(int titleId, string tnputEditTxet, Action<string> confirmAction,int minValue=1,int maxValue=100) |
| | | { |
| | | Dialog dialog = new Dialog() |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | var editTextValue = editText.Text.Trim(); |
| | | int intValue = int.Parse(editTextValue); |
| | | if (intValue <= 0 || intValue > 100) |
| | | int intValue = -1; |
| | | try |
| | | { |
| | | errorId_IsNullOrEmpty = Language.StringByID(StringId.setvalue); |
| | | intValue = int.Parse(editText.Text.Trim()); |
| | | } |
| | | catch |
| | | { |
| | | intValue = -1; |
| | | } |
| | | if (intValue < minValue || intValue > maxValue) |
| | | { |
| | | errorId_IsNullOrEmpty = Language.StringByID(StringId.setvalue).Replace("{0}", minValue.ToString()).Replace("{1}", maxValue.ToString()); |
| | | } |
| | | } |
| | | if (errorId_IsNullOrEmpty!="") |
| | |
| | | |
| | | btnTip.X = Application.GetRealWidth(53); |
| | | btnTip.Y = editBjView.Bottom + Application.GetRealHeight(12); |
| | | btnTip.Width = Application.GetRealWidth(157);//200 |
| | | btnTip.Height = Application.GetRealHeight(24);//17 |
| | | btnTip.Width = Application.GetRealWidth(180);//200 |
| | | btnTip.Height = Application.GetRealHeight(20);//17 |
| | | btnTip.Text = errorId_IsNullOrEmpty; |
| | | btnTip.TextColor = CSS_Color.textRedColor; |
| | | btnTip.TextSize = TextSize.text12; |
| | |
| | | btnTip.IsMoreLines = true; |
| | | return; |
| | | } |
| | | |
| | | confirmAction(editText.Text.Trim()); |
| | | string editTextValue= int.Parse(editText.Text.Trim()).ToString(); |
| | | confirmAction(editTextValue); |
| | | dialog.Close(); |
| | | }; |
| | | |