public static KeyValuePair <bool, string> Show(string name, ExpressionMemberValueDescription description, string initialValue, bool mandatory, string defaultValue, bool pathEditor = false)
        {
            using (DialogSimple form = new DialogSimple())
            {
                string caption = "";
                caption += description.Type == ExpressionMemberValueType.VarDouble ? "[float] " : "";
                caption += description.Type == ExpressionMemberValueType.VarString ? "[string] " : "";
                caption += description.Type == ExpressionMemberValueType.Body ? "Element contents" : "";
                caption += description.Type == ExpressionMemberValueType.VarInteger ? "[integer] " : "";
                caption += description.Type == ExpressionMemberValueType.VarBool ? "[boolean] " : "";
                caption += name;
                if (description.Min != null || description.Max != null)
                {
                    if (description.Type == ExpressionMemberValueType.VarBool)
                    {
                    }
                    else if (description.Type == ExpressionMemberValueType.VarString)
                    {
                    }
                    else
                    {
                        caption += " [";
                        caption += description.Min == null ? "-INF" : description.Min.ToString();
                        caption += " ... ";
                        caption += description.Max == null ? "+INF" : description.Max.ToString();
                        caption += "]";
                    }
                }

                if (pathEditor)
                {
                    string info = (string)description.Min;
                    if (info.IndexOf(';') == -1)
                    {
                        throw new ArgumentException("description", "Semicolon not found! Min value for PathEditor typed ValueDescription should contain file extensions and header separated by semicolon.");
                    }
                    form.OpenFileExtensions     = info.Substring(0, info.IndexOf(';'));
                    form.OpenFileHeader         = info.Substring(info.IndexOf(';') + 1);
                    form.PathRelativity         = (PathRelativityMode)description.Max;
                    form.openFileButton.Visible = true;
                }
                else
                {
                    form.OpenFileExtensions     = "";
                    form.OpenFileHeader         = "";
                    form.PathRelativity         = (PathRelativityMode)0;
                    form.openFileButton.Visible = false;
                }

                form.Text            = caption;
                form.Description     = description;
                form.input.Text      = initialValue;
                form.DefaultValue    = defaultValue;
                form.NullMode        = initialValue == null;
                form.nullButton.Text = defaultValue == null ? "Null" : "Default";

                if (description.Type == ExpressionMemberValueType.Body)
                {
                    form.Height          = 300;
                    form.Width           = 900;
                    form.input.Multiline = true;
                }
                form.warningLabel.Width = (pathEditor ? form.openFileButton.Left : form.button1.Left) - form.warningLabel.Left - 2;

                if (form.ShowDialog() == DialogResult.Cancel)
                {
                    return(new KeyValuePair <bool, string>(false, null));
                }

                string result = form.NullMode ? defaultValue : form.input.Text;
                //R. Judge: Changes Jan 16, 2013, to band-aid up to 1.7
                if (result != null && description.Type == ExpressionMemberValueType.VarDouble)
                {
                    double resd = 0;

                    if (double.TryParse(result, NumberStyles.Float, NumberFormatInfo.CurrentInfo, out resd))
                    {
                        result = Helper.DoubleToString(resd);
                    }
                }
                if (result != null && description.Type == ExpressionMemberValueType.VarInteger)
                {
                    int resi = 0;
                    if (int.TryParse(result, NumberStyles.Float, NumberFormatInfo.CurrentInfo, out resi))
                    {
                        result = resi.ToString();
                    }
                }
                //R. Judge: End changes Jan 16, 2013.
                return(new KeyValuePair <bool, string>(true, result));
            }
        }
        public static KeyValuePair<bool, string> Show(string name, ExpressionMemberValueDescription description, string initialValue, bool mandatory, string defaultValue, bool pathEditor = false)
        {
            using (DialogSimple form = new DialogSimple())
            {
                string caption = "";
                caption += description.Type == ExpressionMemberValueType.VarDouble ? "[float] " : "";
                caption += description.Type == ExpressionMemberValueType.VarString ? "[string] " : "";
                caption += description.Type == ExpressionMemberValueType.Body ? "Element contents" : "";
                caption += description.Type == ExpressionMemberValueType.VarInteger ? "[integer] " : "";
                caption += description.Type == ExpressionMemberValueType.VarBool ? "[boolean] " : "";
                caption += name;
                if (description.Min != null || description.Max != null)
                {
                    if (description.Type == ExpressionMemberValueType.VarBool)
                    {

                    }
                    else if (description.Type == ExpressionMemberValueType.VarString)
                    {

                    }
                    else
                    {
                        caption += " [";
                        caption += description.Min == null ? "-INF" : description.Min.ToString();
                        caption += " ... ";
                        caption += description.Max == null ? "+INF" : description.Max.ToString();
                        caption += "]";
                    }
                }

                if (pathEditor)
                {
                    string info = (string)description.Min;
                    if (info.IndexOf(';') == -1)
                        throw new ArgumentException("description", "Semicolon not found! Min value for PathEditor typed ValueDescription should contain file extensions and header separated by semicolon.");
                    form.OpenFileExtensions = info.Substring(0, info.IndexOf(';'));
                    form.OpenFileHeader = info.Substring(info.IndexOf(';') + 1);
                    form.PathRelativity = (PathRelativityMode)description.Max;
                    form.openFileButton.Visible = true;
                }
                else
                {
                    form.OpenFileExtensions = "";
                    form.OpenFileHeader = "";
                    form.PathRelativity = (PathRelativityMode)0;
                    form.openFileButton.Visible = false;
                }

                form.Text = caption;
                form.Description = description;
                form.input.Text = initialValue;
                form.DefaultValue = defaultValue;
                form.NullMode = initialValue == null;
                form.nullButton.Text = defaultValue == null ? "Null" : "Default";

                if (description.Type == ExpressionMemberValueType.Body)
                {
                    form.Height = 300;
                    form.Width = 900;
                    form.input.Multiline = true;
                }
                form.warningLabel.Width = (pathEditor ? form.openFileButton.Left : form.button1.Left) - form.warningLabel.Left - 2;

                if (form.ShowDialog() == DialogResult.Cancel)
                    return new KeyValuePair<bool, string>(false, null);

                string result = form.NullMode ? defaultValue : form.input.Text;
                //R. Judge: Changes Jan 16, 2013, to band-aid up to 1.7
                if (result != null && description.Type == ExpressionMemberValueType.VarDouble)
                {
                    double resd = 0;

                    if (double.TryParse(result, NumberStyles.Float, NumberFormatInfo.CurrentInfo, out resd))
                    {
                        result = Helper.DoubleToString(resd);
                    }
                }
                if (result != null && description.Type == ExpressionMemberValueType.VarInteger)
                {
                    int resi = 0;
                    if (int.TryParse(result, NumberStyles.Float, NumberFormatInfo.CurrentInfo, out resi))
                    {
                        result = resi.ToString();
                    }
                }
                //R. Judge: End changes Jan 16, 2013.
                return new KeyValuePair<bool, string>(true, result);
            }
        }