public static bool ShowUntyped(Type type, ref object value, string title = null, string text = null, string labelText = null, string format = null, string unitText = null, Window owner = null) { ValueLineBox vlb = new ValueLineBox(); vlb.Title = title ?? SelectorMessage.ChooseAValue.NiceToString(); vlb.tb.Text = text ?? SelectorMessage.PleaseChooseAValueToContinue.NiceToString(); vlb.valueLine.Type = type; if (labelText == null) { Common.SetLabelVisible(vlb.valueLine, false); } else { vlb.valueLine.LabelText = labelText; } vlb.valueLine.Format = format; vlb.valueLine.UnitText = unitText; vlb.valueLine.Value = value; vlb.Owner = owner; if (vlb.ShowDialog() == true) { value = vlb.valueLine.Value; return(true); } return(false); }