public PipeLineFac(FacClassReg facClassReg, FacStyleClass style, IRowBuffer rowInfo, TopoClass tc, bool isSBackhind = true, bool isEBackhind = true) : base(facClassReg, style, rowInfo) { this._tc = tc; this._isSBackhind = isSBackhind; this._isEBackhind = isEBackhind; this.Init(); }
public PipeNodeFac(FacClassReg facClassReg, FacStyleClass style, IRowBuffer rowInfo, TopoClass tc) : base(facClassReg, style, rowInfo) { this._angleZ = -1.0; this._yaw = 0; this._pitch = 0; this._tc = tc; this.Init(); }
private List <TopoClass> GetAllTopoClasses() { IFdeCursor cursor = null; IRowBuffer row = null; try { IFeatureDataSet fds = this._dsTemplate.OpenFeatureDataset("DataSet_BIZ"); if (fds == null) { return(null); } IObjectClass oc = fds.OpenObjectClass("OC_TopoManage"); if (oc == null) { return(null); } IQueryFilter filter = new QueryFilterClass { WhereClause = "1=1" }; cursor = oc.Search(filter, true); List <TopoClass> list = new List <TopoClass>(); while ((row = cursor.NextRow()) != null) { TopoClass tc = new TopoClass(); if (row.FieldIndex("oid") >= 0) { object obj = row.GetValue(row.FieldIndex("oid")); if (obj != null) { tc.Id = int.Parse(obj.ToString()); } } if (row.FieldIndex("ObjectId") >= 0) { object obj = row.GetValue(row.FieldIndex("ObjectId")); if (obj != null) { tc.ObjectId = obj.ToString(); } } if (row.FieldIndex("TopoLayerName") >= 0) { object obj = row.GetValue(row.FieldIndex("TopoLayerName")); if (obj != null) { tc.Name = obj.ToString(); } } if (row.FieldIndex("Tolerance") >= 0) { object obj = row.GetValue(row.FieldIndex("Tolerance")); if (obj != null) { tc.Tolerance = double.Parse(obj.ToString()); } } if (row.FieldIndex("ToleranceZ") >= 0) { object obj = row.GetValue(row.FieldIndex("ToleranceZ")); if (obj != null) { tc.ToleranceZ = double.Parse(obj.ToString()); } } if (row.FieldIndex("IgnoreZ") >= 0) { object obj = row.GetValue(row.FieldIndex("IgnoreZ")); if (obj != null) { tc.IgnoreZ = obj.ToString() == "1" ? true : false; } } if (row.FieldIndex("TopoTableName") >= 0) { object obj = row.GetValue(row.FieldIndex("TopoTableName")); if (obj != null) { tc.TopoTable = obj.ToString(); } } if (row.FieldIndex("Comment") >= 0) { object obj = row.GetValue(row.FieldIndex("Comment")); if (obj != null) { tc.Comment = obj.ToString(); } } list.Add(tc); } return(list); } catch (Exception exception) { return(null); } finally { if (cursor != null) { System.Runtime.InteropServices.Marshal.ReleaseComObject(cursor); cursor = null; } if (row != null) { System.Runtime.InteropServices.Marshal.ReleaseComObject(row); row = null; } } }