/// <summary> /// Deep Clone /// </summary> /// <returns></returns> public IDSSubLoop Copy() { IDSSubLoop subLoop = MemberwiseClone() as IDSSubLoop; subLoop.Equipments = this.Equipments.Copy(); return(subLoop); }
/// <summary> /// Deep Clone /// </summary> /// <returns></returns> public IDSSubLoop Copy() { IDSSubLoop subLoop = MemberwiseClone() as IDSSubLoop; subLoop._loop = this.Loop; subLoop.Equipments = this.Equipments.Copy(); subLoop.EquipingLocations = this.EquipingLocations.Copy(); subLoop.IOSignals = this.IOSignals.Copy(); return(subLoop); }
public IDSEquipment(IDSSubLoop subLoop) { ID = ""; ParentID = ""; _subLoop = subLoop; OriginalTag = ""; FunctionCode = ""; Suffix = ""; RepositoryCatagoryID = ""; SpecificInfo1 = ""; SpecificInfo2 = ""; Quantity = 0; Remark = ""; Repository = new IDSRepository(); SubEquipments = new IDSSubEquipmentCollection(); }
public IDSEquipingLocation(IDSSubLoop subLoop) { ID = ""; ParentID = ""; _subLoop = subLoop; CabinetType = ""; SerialNumber = ""; Description = ""; Area = ""; SubArea = ""; Tag = ""; CabinetUnit = ""; CabinetUnitHeight = ""; Name = ""; ModelNumber = ""; Dimension = ""; Color = ""; OpenType = ""; Remark = ""; }
public IDSIOSignal(IDSSubLoop subLoop) { ID = ""; ParentID = ""; _subLoop = subLoop; SignalCategory = ""; FunctionCode = ""; FunctionName = ""; ObjectCode = ""; ObjectName = ""; OriginalShortTag = ""; OriginalShortName = ""; OriginalEngineeringRange = ""; SignalType = ""; OriginalSignalModulePlacement = ""; IOTerminalType = ""; IOTerminalTag = ""; ChannelNumber = ""; Remark = ""; }
public static IDSSubLoop CreateIDSSubLoop(DataRow rowSubLoop, string loopType, string loopSerialNumber, string loopSuffix, string subSystemCode, string systemCode, string location, DataTable tableEquipment, DataTable tableSubEquipment, DataTable tableRepositories, DataTable tableCable, DataTable tableMountingScheme) { if (rowSubLoop == null) { throw new System.ArgumentNullException("frome function CreateIDSSubLoop", "Parameter rowSubLoop equals to null"); } IDSSubLoop subLoop = new IDSSubLoop(); lock (rowSubLoop) { try { subLoop.ID = Convert.ToString(rowSubLoop[TblIDSHierarchy.ID]).Trim(); subLoop.ParentID = Convert.ToString(rowSubLoop[TblIDSHierarchy.ParentID]).Trim(); subLoop.Code = (rowSubLoop[TblIDSHierarchy.Code] as string).Trim(); subLoop.Name = (rowSubLoop[TblIDSHierarchy.Name] as string).Trim(); subLoop.IsNameInSubLoop = Convert.ToBoolean(rowSubLoop[TblIDSHierarchy.IsNameInLoop]); subLoop.IsNameInFront = Convert.ToBoolean(rowSubLoop[TblIDSHierarchy.IsNameInFront]); subLoop.Phase = (rowSubLoop[TblIDSHierarchy.Phase] as string).Trim(); subLoop.SerialNumber = Convert.ToString(rowSubLoop[TblIDSHierarchy.SerialNumber]).Trim(); subLoop.Description = (rowSubLoop[TblIDSHierarchy.Description] as string).Trim(); subLoop.Equipments.Clear(); lock (tableEquipment) { foreach (DataRow rowEquipment in tableEquipment.Rows) { if (Convert.ToString(rowEquipment[TblIDSEquipment.ParentID]).Trim() == subLoop.ID) { subLoop.Equipments.Add(CreateIDSEquipment(rowEquipment, subLoop.Code, loopType, loopSerialNumber, loopSuffix, subSystemCode, systemCode, location, tableSubEquipment, tableRepositories, tableCable, tableMountingScheme)); } } } } catch (System.Data.DataException ex) { MessageBoxWinForm.Info("数据访问错误", ex.Message, ""); } } return(subLoop); }