/// <summary> /// 设置对话框显示 /// </summary> private void SetDisp(NXOpen.Assemblies.Component ct) { if (ParentAssmblieInfo.IsElectrode(ct)) { this.groupEle.Show = true; info = ElectrodeInfo.GetAttribute(ct); //this.strMoldNumber.Show = false; // this.strWorkpieceNumber.Show = false; // this.strEditionNumber.Show = false; this.groupWorkpiece.Show = false; this.groupWork.Show = false; ElectrodeInfo eleInfo = info as ElectrodeInfo; string temp = info.MoldInfo.MoldNumber + "-" + info.MoldInfo.WorkpieceNumber; this.strEleName.Value = temp; this.strEleName1.Value = eleInfo.AllInfo.Name.EleName.Substring(temp.Length, eleInfo.AllInfo.Name.EleName.Length - temp.Length); this.strEleEditionNumber.Value = eleInfo.AllInfo.Name.EleEditionNumber; } else if (ParentAssmblieInfo.IsWorkpiece(ct)) { info = WorkPieceInfo.GetAttribute(ct); this.groupWorkpiece.Show = true; this.groupEle.Show = false; this.groupWork.Show = false; this.strMoldNumber.Value = info.MoldInfo.MoldNumber; this.strWorkpieceNumber.Value = info.MoldInfo.WorkpieceNumber; this.strEditionNumber.Value = info.MoldInfo.EditionNumber; } else if (ParentAssmblieInfo.IsWork(ct)) { info = WorkInfo.GetAttribute(ct); this.groupWork.Show = true; this.groupEle.Show = false; this.groupWorkpiece.Show = false; this.intWorkNumber.Value = (info as WorkInfo).WorkNumber; } else if (!ParentAssmblieInfo.IsParent(ct)) { this.groupWorkpiece.Show = true; this.groupEle.Show = false; this.strWorkpieceNumber.Value = ct.Name; } }