예제 #1
0
파일: UCMapControl.cs 프로젝트: zj8487/HyDM
        private void ucResultsTree_TreeListNodeIsSelected(string strRuleName, TreeRulesEventArgs e)
        {
            this.ucResult.ContentType = enumContentType.Error;
            if (e.SubRules == null)
            {
                this.ucResult.PageCount = 0;
                dockResults.Text        = string.Format("{0}错误总数:{1}个", strRuleName, e.RulesCount);
                return;
            }
            else
            {
                dockResults.Text = string.Format("规则分类:{0} 错误总数:{1}                                                           双击错误信息可以对图形进行定位", strRuleName == "0" ? e.RuleTypeName : strRuleName, e.RulesCount);
                if (dockResults.Visibility != DockVisibility.Visible)
                {
                    dockResults.Visibility = DockVisibility.Visible;
                    dockResults.Height     = 260;
                }
            }
            if (e.BolHaveChildNode)
            {
                this.ucResult.SetTreeListNode((TreeListNode)e.SubRules);
                // this.ucResult.set = obj as DataTable;
            }
            else
            {
                double dou = (double)e.RulesCount / COMMONCONST.MAX_ROWS;
                this.ucResult.PageCount = (int)Math.Ceiling(dou);
                m_DtSchema = e.SubRules as DataTable;
                errCount   = e.RulesCount;

                this.ucResult.DataSource = GetError(0);
            }
        }
예제 #2
0
파일: UCMapControl.cs 프로젝트: zj8487/HyDM
        private void ucRulesTree1_TreeListNodeIsSelected(string strRuleName, TreeRulesEventArgs e)
        {
            this.ucResult.ContentType = enumContentType.Rule;
            if (e.SubRules == null)
            {
                dockResults.Text = string.Format("{0}规则检查总项为{1}个", strRuleName, e.RulesCount);;
                return;
            }
            else
            {
                dockResults.Text = string.Format("规则分类:{0} 规则总数{1}", strRuleName == "0"? e.RuleTypeName:strRuleName, e.RulesCount);
                if (dockResults.Visibility != DockVisibility.Visible)
                {
                    dockResults.Visibility = DockVisibility.Visible;
                    dockResults.Height     = 260;
                }
            }

            if (e.BolHaveChildNode)
            {
                this.ucResult.SetTreeListNode((TreeListNode)e.SubRules);
                // this.ucResult.set = obj as DataTable;
            }
            else
            {
                this.ucResult.DataSource = e.SubRules as DataTable;
            }
        }
예제 #3
0
        private void treeListRule_Click(object sender, EventArgs e)
        {
            if (TreeShowType == RuleTreeShowType.ViewRulesAndSelection)
            {
                return;
            }

            if (this.treeListRule.Selection.Count > 0)
            {
                TreeListNode       node = treeListRule.Selection[0];
                TreeRulesEventArgs ev   = new TreeRulesEventArgs();
                if (TreeListNodeIsSelected != null)
                {
                    if (TreeShowType == RuleTreeShowType.ViewRules)
                    {
                        ev.RulesCount   = int.Parse(node["rulesCount"].ToString());
                        ev.RuleTypeName = node["TypeName"].ToString();
                        ev.SubRules     = GetSubRulesSource(node);
                        if (node.HasChildren)
                        {
                            ev.BolHaveChildNode = true;
                        }
                    }
                    else
                    {
                        ev              = new TreeRulesEventArgs();
                        ev.RulesCount   = int.Parse(node["rulesCount"].ToString());
                        ev.RuleTypeName = node["TypeName"].ToString();
                        ev.SubRules     = this.GetSubResultsSource(node);
                        if (node.HasChildren)
                        {
                            ev.BolHaveChildNode = true;
                        }
                    }
                    TreeListNodeIsSelected.Invoke(node["RuleName"].ToString(), ev);
                }
            }
        }
예제 #4
0
        private void treeListRule_Click(object sender, EventArgs e)
        {
            if (TreeShowType == RuleTreeShowType.ViewRulesAndSelection) return;

            if (this.treeListRule.Selection.Count > 0)
            {
                TreeListNode node = treeListRule.Selection[0];
                TreeRulesEventArgs ev = new TreeRulesEventArgs();
                if (TreeListNodeIsSelected != null)
                {
                    if (TreeShowType == RuleTreeShowType.ViewRules)
                    {
                        ev.RulesCount = int.Parse(node["rulesCount"].ToString());
                        ev.RuleTypeName = node["TypeName"].ToString();
                        ev.SubRules = GetSubRulesSource(node);
                        if (node.HasChildren)
                        {
                            ev.BolHaveChildNode = true;
                        }
                    }
                    else
                    {
                        ev = new TreeRulesEventArgs();
                        ev.RulesCount = int.Parse(node["rulesCount"].ToString());
                        ev.RuleTypeName = node["TypeName"].ToString();
                        ev.SubRules = this.GetSubResultsSource(node);
                        if (node.HasChildren)
                        {
                            ev.BolHaveChildNode = true;
                        }
                    }
                    TreeListNodeIsSelected.Invoke(node["RuleName"].ToString(), ev);
                }
            }
        }
예제 #5
0
        private void ucRulesTree1_TreeListNodeIsSelected(string strRuleName, TreeRulesEventArgs e)
        {
            this.ucResult.ContentType = enumContentType.Rule;
            if (e.SubRules == null)
            {
                dockResults.Text = string.Format("{0}����������Ϊ{1}��", strRuleName, e.RulesCount); ;
                return;
            }
            else
            {
                dockResults.Text = string.Format("�������:{0} ��������{1}",strRuleName=="0"? e.RuleTypeName:strRuleName,e.RulesCount);
                if (dockResults.Visibility != DockVisibility.Visible)
                {
                    dockResults.Visibility = DockVisibility.Visible;
                    dockResults.Height = 260;
                }
            }

            if (e.BolHaveChildNode)
            {
                this.ucResult.SetTreeListNode((TreeListNode)e.SubRules);
               // this.ucResult.set = obj as DataTable;
            }
            else
            {
                this.ucResult.DataSource = e.SubRules as DataTable;
            }
        }
예제 #6
0
        private void ucResultsTree_TreeListNodeIsSelected(string strRuleName, TreeRulesEventArgs e)
        {
            this.ucResult.ContentType = enumContentType.Error;
            if (e.SubRules == null)
            {
                this.ucResult.PageCount = 0;
                dockResults.Text = string.Format("{0}��������:{1}��", strRuleName, e.RulesCount);
                return;
            }
            else
            {
                dockResults.Text = string.Format("�������:{0} ��������:{1}                                                           ˫��������Ϣ���Զ�ͼ�ν��ж�λ", strRuleName == "0" ? e.RuleTypeName : strRuleName, e.RulesCount);
                if (dockResults.Visibility != DockVisibility.Visible)
                {
                    dockResults.Visibility = DockVisibility.Visible;
                    dockResults.Height = 260;
                }
            }
            if (e.BolHaveChildNode)
            {
                this.ucResult.SetTreeListNode((TreeListNode)e.SubRules);
                // this.ucResult.set = obj as DataTable;
            }
            else
            {
                double dou = (double)e.RulesCount / COMMONCONST.MAX_ROWS;
                this.ucResult.PageCount =(int)Math.Ceiling(dou);
                m_DtSchema=e.SubRules as DataTable;
                errCount = e.RulesCount;

                this.ucResult.DataSource = GetError(0);
            }
        }