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

            if (null == fvd)
            {
                return;
            }
            if (null != SourceField)
            {
                FieldTreeNodeData currentNode = fvd.FindNodeBySource(SourceField);
                if (null != currentNode)
                {
                    fvd.PopulateTree(this.DataSourceTreeView, currentNode, true);
                }
            }
            else
            {
                fvd.PopulateTree(this.DataSourceTreeView, true, BindingSourceField);
            }
            AddParamVar();
            //LoadSysParams();
            SelectNode();
            //this.DataSourceTreeView.ExpandAll();
            if (!string.IsNullOrEmpty(this.FieldTextTb.Text))
            {
                this.FieldTextTb.Focus();
                this.FieldTextTb.Select(0, this.FieldTextTb.Text.Length);
            }
        }
Пример #2
0
        private void RefreshTree()
        {
            FieldTreeViewData fvd = CurrentPrjInfo.GetCurrentReportDataDefine() as FieldTreeViewData;

            if (null == fvd)
            {
                return;
            }
            if (cb_CustomMode.Checked)
            {
                this.tb_TablePath.Enabled = true;
                fvd.PopulateTree(this.DataSourceTreeView);
            }
            else
            {
                this.tb_TablePath.Enabled = false;
                if (null != _allField)
                {
                    FieldTreeNodeData currentNode = fvd.FindNodeBySource(_allField);
                    if (null != currentNode)
                    {
                        fvd.PopulateTreeAddRoot(this.DataSourceTreeView, currentNode);
                    }
                }
                else
                {
                    fvd.PopulateTree(this.DataSourceTreeView);
                }
            }
            FilterTreeView();
            bool isSelect = false;

            foreach (TreeNode node in this.DataSourceTreeView.Nodes)
            {
                isSelect |= SelectNode(SourceField, node);
            }
            if (!isSelect)
            {
                if (this.DataSourceTreeView.Nodes.Count > 0)
                {
                    this.DataSourceTreeView.ExpandAll();
                }
            }
            if (null != this.DataSourceTreeView.SelectedNode)
            {
                this.DataSourceTreeView.SelectedNode.EnsureVisible();
            }
        }
Пример #3
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));
                    }
                }
            }
        }