public ElectrodeInfo(MoldInfo mold, UserModel user, ElectrodeAllInfo allInfo, Matrix4Info matInfo) : base(mold, user) { this.Type = PartType.Electrode; this.MatrInfo = matInfo; this.AllInfo = allInfo; this.Matr = matInfo.Matr; }
public ElectrodeDrawingInfo(MoldInfo mold, UserModel user, ElectrodeAllInfo allInfo) : base(mold, user) { this.Type = PartType.Drawing; this.AllInfo = allInfo; string temp = AllInfo.Preparetion.Preparation[0].ToString() + "*" + AllInfo.Preparetion.Preparation[1].ToString() + "*" + AllInfo.Preparetion.Preparation[2].ToString(); this.StrPre = temp; }
/// <summary> /// 通过行获取数据 /// </summary> /// <param name="row"></param> public static ElectrodeAllInfo GetInfoForDataRow(DataRow row) { try { ElectrodeAllInfo info = new ElectrodeAllInfo() { CAM = ElectrodeCAMInfo.GetInfoForDataRow(row), Datum = ElectrodeDatumInfo.GetInfoForDataRow(row), GapValue = ElectrodeGapValueInfo.GetInfoForDataRow(row), Name = ElectrodeNameInfo.GetInfoForDataRow(row), Pitch = ElectrodePitchInfo.GetInfoForDataRow(row), Preparetion = ElectrodePreparationInfo.GetInfoForDataRow(row), Remarks = ElectrodeRemarksInfo.GetInfoForDataRow(row), SetValue = ElectrodeSetValueInfo.GetInfoForDataRow(row) }; return(info); } catch (Exception ex) { throw ex; } }
/// <summary> /// 以属性得到实体 /// </summary> /// <param name="obj"></param> /// <returns></returns> public new static ElectrodeInfo GetAttribute(NXObject obj) { try { return(new ElectrodeInfo(MoldInfo.GetAttribute(obj), UserModel.GetAttribute(obj), ElectrodeAllInfo.GetAttribute(obj), Matrix4Info.GetAttribute(obj))); } catch (NXException ex) { ClassItem.WriteLogFile("未获取到属性" + ex.Message); return(null); } }