Пример #1
0
        public void Tree_BeforeExpand(object sender, TreeViewCancelEventArgs e)
        {
            if (BTreeView.IsOnlyDummyNode((BTreeNode)e.Node))
            {
                e.Node.Nodes.Clear();
            }

            int nodeLevel = 0;

            if (_treeNode != null)
            {
                nodeLevel = this._TreeLevel;//_treeNode.Level;
                if (this._TreeLevel > e.Node.Level)
                {
                    return;
                }
            }

            DCValueOfTree dcValue = TreeDCUtil.GetDCValue(e.Node); // TreeNode에서 DCValueOfTree값을 추출.

            if (dcValue == null)
            {
                return;
            }

            TreeNode tnCurrent = e.Node;

            if (this.UseDefaultCondition.Equals(Definition.YES))
            {
                if (dcValue.ContextId == Definition.DynamicCondition_Search_key.DCP_ID)
                {
                    if (tnCurrent.Nodes.Count > 0)
                    {
                        return;
                    }

                    if (dcValue.Value == this.DcpRawid)
                    {
                        AddModuleNode(tnCurrent, dcValue.Value);
                    }
                }
                else if (dcValue.ContextId.Contains(Definition.DynamicCondition_Search_key.MODULE))
                {
                    if (tnCurrent.Nodes.Count > 0)
                    {
                        return;
                    }

                    AddSubModuleNode(tnCurrent, dcValue.Value);

                    if (this.RecipeTypeCode != RecipeType.NONE)
                    {
                        XProductTree productTree = new XProductTree(this.XTreeView);

                        productTree.ModuleRawid          = dcValue.Value;
                        productTree.IsShowCheck          = this.IsShowCheckProduct;
                        productTree.IsShowCheckRecipe    = this.IsShowCheckRecipe;
                        productTree.RecipeTypeCode       = this.RecipeTypeCode;
                        productTree.IsShowRecipeWildcard = this.IsShowRecipeWildcard;

                        productTree.AddRootNode(e.Node);
                    }

                    if (this.ParamTypeCode == ParameterType.TRACE)
                    {
                        XTraceParamTree traceTree = new XTraceParamTree(this.XTreeView);

                        traceTree.ModuleRawid      = dcValue.Value;
                        traceTree.DcpRawid         = this.DcpRawid;
                        traceTree.IsCheckParamType = this.IsCheckParamType;

                        traceTree.AddRootNode(e.Node);
                    }
                    else if (this.ParamTypeCode == ParameterType.TRACE_SUMMARY || this.ParamTypeCode == ParameterType.EVENT_SUMMARY)
                    {
                        XSummaryParamTree sumTree = new XSummaryParamTree(this.XTreeView);

                        sumTree.ModuleRawid      = dcValue.Value;
                        sumTree.DcpRawid         = this.DcpRawid;
                        sumTree.IsCheckParamType = this.IsCheckParamType;

                        sumTree.AddRootNode(e.Node);
                    }
                }
            }
            else
            {
                if (dcValue.ContextId.Contains(Definition.DynamicCondition_Search_key.MODULE))
                {
                    if (tnCurrent.Nodes.Count > 0)
                    {
                        return;
                    }

                    AddSubModuleNode(tnCurrent, dcValue.Value);

                    if (this.RecipeTypeCode != RecipeType.NONE)
                    {
                        XRecipeTree recipeTree = new XRecipeTree(this.XTreeView);

                        recipeTree.ModuleRawid          = dcValue.Value;
                        recipeTree.IsShowCheck          = this.IsShowCheckRecipe;
                        recipeTree.IsShowRecipeWildcard = this.IsShowRecipeWildcard;

                        if (this.RecipeTypeCode == RecipeType.STEP)
                        {
                            recipeTree.IsStepNode      = true;
                            recipeTree.IsMvaModelNode  = false;
                            recipeTree.IsSpecGroupNode = false;
                        }
                        else if (this.RecipeTypeCode == RecipeType.SPEC_GROUP)
                        {
                            recipeTree.IsStepNode      = false;
                            recipeTree.IsMvaModelNode  = false;
                            recipeTree.IsSpecGroupNode = true;
                        }
                        else if (this.RecipeTypeCode == RecipeType.MVA_MODEL)
                        {
                            recipeTree.IsStepNode      = true;
                            recipeTree.IsMvaModelNode  = true;
                            recipeTree.IsSpecGroupNode = false;
                        }
                        else if (this.RecipeTypeCode == RecipeType.ALL)
                        {
                            recipeTree.IsStepNode      = true;
                            recipeTree.IsMvaModelNode  = false;
                            recipeTree.IsSpecGroupNode = true;
                        }
                        else
                        {
                            recipeTree.IsStepNode      = false;
                            recipeTree.IsMvaModelNode  = false;
                            recipeTree.IsSpecGroupNode = false;
                        }

                        recipeTree.AddRootNode(e.Node);
                    }
                }
            }
        }
Пример #2
0
        public void Tree_BeforeExpand(object sender, TreeViewCancelEventArgs e)
        {
            if (BTreeView.IsOnlyDummyNode((BTreeNode)e.Node))
            {
                e.Node.Nodes.Clear();
            }

            DCValueOfTree dcValue = TreeDCUtil.GetDCValue(e.Node); // TreeNode에서 DCValueOfTree값을 추출.

            if (dcValue == null)
            {
                return;
            }

            TreeNode tnCurrent = e.Node;

            System.Collections.Generic.List <DCValueOfTree> lstPathValue = TreeDCUtil.GetDCValueOfAllParent(e.Node); // 상위 노드의 선택된 값들을 가져온다.
            for (int i = 0; i < e.Node.Level; i++)
            {
                if (lstPathValue[i].ContextId.Contains(Definition.DynamicCondition_Search_key.MODULE))
                {
                    _sModuleRawid = lstPathValue[i].Value;
                    break;
                }
            }

            if (dcValue.ContextId == Definition.DynamicCondition_Search_key.PRODUCT_TYPE)
            {
                if (e.Node.Nodes.Count > 0)
                {
                    return;
                }

                e.Node.Nodes.Clear();

                AddProductNode(tnCurrent, dcValue.Value, _sModuleRawid);
            }
            else if (dcValue.ContextId == Definition.DynamicCondition_Search_key.PRODUCT)
            {
                if (e.Node.Nodes.Count > 0)
                {
                    return;
                }

                e.Node.Nodes.Clear();

                XRecipeTree recipeTree = new XRecipeTree(this.XTreeView);

                recipeTree.ModuleRawid = _sModuleRawid;
                recipeTree.IsExistAll  = _bExistAll;
                recipeTree.IsShowCheck = this.IsShowCheckRecipe;

                if (this.RecipeTypeCode == RecipeType.STEP)
                {
                    recipeTree.IsStepNode      = true;
                    recipeTree.IsMvaModelNode  = false;
                    recipeTree.IsSpecGroupNode = false;
                }
                else if (this.RecipeTypeCode == RecipeType.SPEC_GROUP)
                {
                    recipeTree.IsStepNode      = false;
                    recipeTree.IsMvaModelNode  = false;
                    recipeTree.IsSpecGroupNode = true;
                }
                else if (this.RecipeTypeCode == RecipeType.MVA_MODEL)
                {
                    recipeTree.IsStepNode      = true;
                    recipeTree.IsMvaModelNode  = true;
                    recipeTree.IsSpecGroupNode = false;
                }
                else if (this.RecipeTypeCode == RecipeType.ALL)
                {
                    recipeTree.IsStepNode      = true;
                    recipeTree.IsMvaModelNode  = false;
                    recipeTree.IsSpecGroupNode = true;
                }
                else //RECIPE인 경우
                {
                    recipeTree.IsStepNode      = false;
                    recipeTree.IsMvaModelNode  = false;
                    recipeTree.IsSpecGroupNode = false;
                }

                recipeTree.AddRootNode(e.Node);
            }
        }