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; if (dcValue.ContextId == Definition.DynamicCondition_Search_key.DCP_ID) { if (e.Node.Nodes.Count > 0) { return; } System.Collections.Generic.List <DCValueOfTree> lstPathValue = TreeDCUtil.GetDCValueOfAllParent(e.Node); // 상위 노드의 선택된 값들을 가져온다. for (int i = 0; i < e.Node.Level; i++) { if (lstPathValue[i].ContextId == Definition.DynamicCondition_Search_key.EQP_ID) { this.EqpID = lstPathValue[i].Value; break; } } XModuleTree moduleTree = new XModuleTree(this.XTreeView);//_btvTreeView); moduleTree.LineRawid = this.LineRawid; moduleTree.AreaRawid = this.AreaRawid; moduleTree.EqpID = this.EqpID; moduleTree.DcpID = dcValue.Value; moduleTree.IsShowCheck = this.IsShowCheckModule; moduleTree.IsShowCheckProduct = this.IsShowCheckProduct; moduleTree.IsShowCheckRecipe = this.IsShowCheckRecipe; moduleTree.IsCheckParamType = this.IsCheckParamType; moduleTree.RecipeTypeCode = this.RecipeTypeCode; moduleTree.ParamTypeCode = this.ParamTypeCode; moduleTree.IsLastNode = this.IsLastNodeModule; moduleTree.IsShowRecipeWildcard = this.IsShowRecipeWildcard; moduleTree.AddRootNode(e.Node); } }
public void Tree_BeforeExpand(object sender, TreeViewCancelEventArgs e) { if (BTreeView.IsOnlyDummyNode((BTreeNode)e.Node)) { e.Node.Nodes.Clear(); } if (_treeNode != null) { if (_treeNode.Level > e.Node.Level) { return; } } DCValueOfTree dcValue = TreeDCUtil.GetDCValue(e.Node); // TreeNode에서 DCValueOfTree값을 추출. if (dcValue == null) { return; } TreeNode tnCurrent = e.Node; if (dcValue.ContextId == Definition.DynamicCondition_Condition_key.EQP) { if (tnCurrent.Nodes.Count > 0) { return; } if (dcValue.Value == this.EqpRawid)//_sEqpRawid) { AddEQPModelNode(tnCurrent, dcValue.Value); } } else if (dcValue.ContextId == Definition.DynamicCondition_Condition_key.DCP_ID) { DCValueOfTree dcParent = TreeDCUtil.GetDCValue(e.Node.Parent); if (dcParent.Value == this.EqpRawid) //_sEqpRawid) { if (e.Node.Nodes.Count > 0) { return; } e.Node.Nodes.Clear(); XModuleTree moduleTree = new XModuleTree(this.XTreeView); //_btvTreeView); moduleTree.EqpRawid = this.EqpRawid; //_sEqpRawid; moduleTree.DcpRawid = dcValue.Value; moduleTree.IsShowCheck = this.IsShowCheckModule; // _bIsShowCheckModule; moduleTree.IsShowCheckProduct = this.IsShowCheckProduct; //._bIsShowCheckProduct; moduleTree.IsShowCheckRecipe = this.IsShowCheckRecipe; //._bIsShowCheckRecipe; moduleTree.IsCheckParamType = this.IsCheckParamType; //._bIsCheckParamType; moduleTree.RecipeTypeCode = this.RecipeTypeCode; // _recipeType; moduleTree.ParamTypeCode = this.ParamTypeCode; // _paramType; moduleTree.IsLastNode = this.IsLastNodeModule; moduleTree.AddRootNode(e.Node); } } else if (dcValue.ContextId == Definition.DynamicCondition_Search_key.EQPMODEL) { if (_bIsSPCModelTree) { if (e.Node.Nodes.Count > 0) { return; } e.Node.Nodes.Clear(); XSPCModelTree spcModelTree = new XSPCModelTree(this.XTreeView); spcModelTree.LineRawid = this.LineRawid; spcModelTree.AreaRawid = this.AreaRawid; spcModelTree.EqpModelName = dcValue.Value; spcModelTree.IsShowCheck = true; spcModelTree.RecipeTypeCode = RecipeType.NONE; spcModelTree.ParamTypeCode = ParameterType.NONE; spcModelTree.IsLastNode = true; spcModelTree.AddRootNode(e.Node); if (e.Node.Nodes.Count > 0) { ((BTreeNode)e.Node).IsVisibleCheckBox = false; } else { ((BTreeNode)e.Node).IsVisibleCheckBox = true; } } } }