private void button_OK_Click(object sender, System.EventArgs e)
        {
            if (this.listBox_CustomFields.SelectedItem != null)
                this.SelectedField = this.listBox_CustomFields.SelectedItem as MyFieldObject;

            this.Close();
        }
        private void listBox_CustomFields_DoubleClick(object sender, System.EventArgs e)
        {
            if (this.listBox_CustomFields.SelectedItem != null)
                this.SelectedField = this.listBox_CustomFields.SelectedItem as MyFieldObject;

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
        private void button_OK_Click(object sender, System.EventArgs e)
        {
            if (this.listBox_CustomFields.SelectedItem != null)
            {
                this.SelectedField = this.listBox_CustomFields.SelectedItem as MyFieldObject;
            }

            this.Close();
        }
        private void listBox_CustomFields_DoubleClick(object sender, System.EventArgs e)
        {
            if (this.listBox_CustomFields.SelectedItem != null)
            {
                this.SelectedField = this.listBox_CustomFields.SelectedItem as MyFieldObject;
            }

            this.DialogResult = DialogResult.OK;
            this.Close();
        }