public static bool InputDoubleDialog(ref double value, int decimals = 2, bool checkEmpty = true, string desc = "请输入数字:", UIStyle style = UIStyle.Blue, bool topMost = false) { UIInputForm frm = new UIInputForm(); frm.TopMost = topMost; frm.Style = style; frm.Editor.Type = UITextBox.UIEditType.Double; frm.Editor.DecLength = decimals; frm.Editor.DoubleValue = value; frm.Text = UILocalize.InputTitle; frm.Label.Text = desc; frm.CheckInputEmpty = checkEmpty; frm.ShowDialog(); if (frm.IsOK) { value = frm.Editor.DoubleValue; return(true); } return(false); }
private static bool InputDoubleDialog(ref double value, double minimum, double maximum, int decimals = 2, bool checkEmpty = true, string desc = "请输入数字:", UIStyle style = UIStyle.Blue) { UIInputForm frm = new UIInputForm(); frm.Style = style; frm.Editor.Type = UITextBox.UIEditType.Double; frm.Editor.DecLength = decimals; frm.Editor.DoubleValue = value; frm.Text = UILocalize.InputTitle; frm.Label.Text = desc; frm.CheckInputEmpty = checkEmpty; frm.Editor.Minimum = minimum; frm.Editor.Maximum = maximum; frm.Editor.HasMaximum = true; frm.Editor.HasMinimum = true; frm.ShowDialog(); if (frm.IsOK) { value = frm.Editor.IntValue; return(true); } return(false); }