public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            // Return the value if the value is not of type Int32, Double and Single.
            if (!(value is CalculateColumnInfo))
            {
                return(value);
            }

            // Uses the IWindowsFormsEditorService to display a
            // drop-down UI in the Properties window.
            IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (edSvc != null)
            {
                CalculateColumnInfo calcuateColumnInfo = value as CalculateColumnInfo;


                // Display an angle selection control and retrieve the value.
                CalculateColumnEditorForm editForm = new CalculateColumnEditorForm(calcuateColumnInfo);


                if (DialogResult.OK == edSvc.ShowDialog(editForm))
                {
                    // Return the value in the appropraite data format.
                    return(editForm.Value);
                }
            }
            return(value);
        }
        private void BtnEditCalcInfo_Click(object sender, EventArgs e)
        {
            CalculateColumnInfo calculateColumnInfo = objField as CalculateColumnInfo;

            if (calculateColumnInfo == null)
            {
                calculateColumnInfo = new CalculateColumnInfo();
            }

            CalculateColumnEditorForm calculateColumnInfoEditForm = new CalculateColumnEditorForm(calculateColumnInfo);

            if (calculateColumnInfoEditForm.ShowDialog() == DialogResult.OK)
            {
                calculateColumnInfoEditForm.HidechkDisplayedSteps();

                objField = calculateColumnInfoEditForm.Value;

                this.SetDisplayFormula(objField);
            }
        }