Пример #1
0
        private void EditTextBindiDialogLoad(object sender, EventArgs e)
        {
            FieldTreeViewData fvd = CurrentPrjInfo.GetCurrentReportDataDefine() as FieldTreeViewData;

            if (null != fvd && fvd.Nodes.Length > 0)
            {
                ReportVar rv = fvd.Nodes[0].Tag as ReportVar;
                if (null != rv)
                {
                    foreach (PMSVar pmsVar in rv.PMSVarList)
                    {
                        this.VarTreeView.Nodes.Add(new TreeNode(pmsVar.VarName, 0, 0));
                    }
                }
            }
        }
Пример #2
0
            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);
            }