public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
            {
                IWindowsFormsEditorService editorService = null;

                if (context != null && context.Instance != null && provider != null)
                {
                    editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
                    if (editorService != null)
                    {
                        if (editorService != null)
                        {
                            SourceFieldDataTable cbx = context.Instance as SourceFieldDataTable;
                            if (cbx != null)
                            {
                                MultiDataSourceConfigForm form = new MultiDataSourceConfigForm();
                                form.MultiDataSource = cbx.MultiDataSource;
                                form.StartPosition   = FormStartPosition.CenterParent;
                                if (form.ShowDialog() == DialogResult.OK)
                                {
                                    List <DSSqlPair> list = new List <DSSqlPair>();
                                    foreach (DSSqlPair dsp in form.MultiDataSource)
                                    {
                                        list.Add(dsp.Clone() as DSSqlPair);
                                    }

                                    value = list;
                                    return(value);
                                }
                            }
                        }
                    }
                }
                return(value);
            }
            public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
            {
                IWindowsFormsEditorService editorService = null;

                if (context != null && context.Instance != null && provider != null)
                {
                    editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
                    if (editorService != null)
                    {
                        if (editorService != null)
                        {
                            SourceFieldDataTable cbx = context.Instance as SourceFieldDataTable;
                            SampleDistanceVar    rfc = new SampleDistanceVar(editorService);
                            if (cbx != null)
                            {
                                rfc.CurrentVarName = cbx.SampleDistanceVar;
                                List <PMSVar>     lp    = new List <PMSVar>();
                                FieldTreeViewData sfAll = (PMS.Libraries.ToolControls.PMSPublicInfo.CurrentPrjInfo.GetCurrentReportDataDefine()) as FieldTreeViewData;
                                if (sfAll != null && sfAll.Nodes != null && sfAll.Nodes.Length > 0)
                                {
                                    ReportVar temp = sfAll.Nodes[0].Tag as ReportVar;
                                    if (temp != null)
                                    {
                                        lp = temp.PMSVarList;
                                    }
                                }
                                rfc.ReportVarList = lp;
                                editorService.DropDownControl(rfc);
                                value = rfc.CurrentVarName;
                                return(value);
                            }
                        }
                    }
                }
                return(value);
            }