protected void Read(ObjectId id, Transaction t) { try { DBDictionary dBDictionary = (DBDictionary)t.GetObject(this.AcadDictionaryID, 0); base.RasterObjectId = (ObjectId)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)330, "AutoCADID"); this.ServiceFullName = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "ServiceFullName"); base.ConnectionName = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "ConnectionName"); base.ConnectionURL = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "ConnectionURL"); base.UserName = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "UserName"); base.ExportOptions = new AGSExportOptions(); this.InitExportOptions(); base.ExportOptions.Format = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "ImageFormat"); base.ExportOptions.BoundingBox = DocUtil.ReadBoundingBox(t, dBDictionary); base.BoundaryExtent = new Extent(base.ExportOptions.BoundingBox); base.ExportOptions.OutputWKT = MSCPrj.ReadWKT(base.ParentDataset.ParentDocument); base.Dynamic = false; if (dBDictionary.Contains("Dynamic")) { Xrecord xrecord = (Xrecord)t.GetObject(dBDictionary.GetAt("Dynamic"), 0); TypedValue[] array = xrecord.Data.AsArray(); for (int i = 0; i < array.Length; i++) { TypedValue typedValue = array[i]; if (typedValue.TypeCode == 290) { base.Dynamic = (0 != Convert.ToInt16(typedValue.Value)); } } } base.ExportOptions.Dynamic = base.Dynamic; base.ExportOptions.TransCompression = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "Compression"); base.ExportOptions.Quality = (int)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)90, "Quality"); base.ExportOptions.Interpolation = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "Interpolation"); base.ExportOptions.MosaicMethod = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "MosaicMethod"); base.ExportOptions.OrderField = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "OrderField"); base.ExportOptions.OrderBaseValue = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "OrderBaseValue"); base.ExportOptions.LockRasterID = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "LockRasterID"); base.ExportOptions.MosaicOperator = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "MosaicOperator"); if (dBDictionary.Contains("Ascending")) { Xrecord xrecord2 = (Xrecord)t.GetObject(dBDictionary.GetAt("Ascending"), 0); TypedValue[] array2 = xrecord2.Data.AsArray(); for (int j = 0; j < array2.Length; j++) { TypedValue typedValue2 = array2[j]; if (typedValue2.TypeCode == 290) { base.ExportOptions.Ascending = (0 != Convert.ToInt16(typedValue2.Value)); } } } if (this.ReconnectService()) { base.RefreshConnectedService(); } } catch { } }
protected void Read(ObjectId id, Transaction t) { try { DBDictionary dBDictionary = (DBDictionary)t.GetObject(this.AcadDictionaryID, 0); base.RasterObjectId = (ObjectId)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)330, "AutoCADID"); this.ServiceFullName = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "ServiceFullName"); base.ConnectionName = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "ConnectionName"); base.ConnectionURL = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "ConnectionURL"); base.UserName = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "UserName"); base.BoundaryExtent = DocUtil.ReadBoundingBox(t, dBDictionary); base.ExportOptions = new AGSExportOptions(); this.InitExportOptions(); base.ExportOptions.Format = (string)DocUtil.ReadXRecord(t, dBDictionary, (DxfCode)1, "ImageFormat"); base.ExportOptions.BoundingBox = new Extent(base.BoundaryExtent); base.ExportOptions.OutputWKT = MSCPrj.ReadWKT(base.ParentDataset.ParentDocument); try { base.Dynamic = false; if (dBDictionary.Contains("Dynamic")) { Xrecord xrecord = (Xrecord)t.GetObject(dBDictionary.GetAt("Dynamic"), 0); TypedValue[] array = xrecord.Data.AsArray(); for (int i = 0; i < array.Length; i++) { TypedValue typedValue = array[i]; if (typedValue.TypeCode == 290) { base.Dynamic = (0 != Convert.ToInt16(typedValue.Value)); } } } base.ExportOptions.Dynamic = base.Dynamic; } catch { base.ExportOptions.Dynamic = false; } if (dBDictionary.Contains("ESRI_Layers")) { DBDictionary dBDictionary2 = (DBDictionary)t.GetObject(dBDictionary.GetAt("ESRI_Layers"), 0); using (DbDictionaryEnumerator enumerator = dBDictionary2.GetEnumerator()) { while (enumerator.MoveNext()) { DBDictionaryEntry current = enumerator.Current; MSCMapLayer mSCMapLayer = new MSCMapLayer(t, current.Key, current.Value); mSCMapLayer.ParentMap = this; if (mSCMapLayer.Layers != null) { foreach (MSCMapLayer current2 in mSCMapLayer.Layers) { current2.ParentMap = this; } } this.Layers.Add(mSCMapLayer); } } } if (this.ReconnectService()) { base.RefreshConnectedService(); } } catch { } }