public void Save(IPersistStream stream) { stream.Save("name", _name); stream.Save("X", _X); stream.Save("Y", _Y); stream.Save("Z", _Z); stream.Save("rX", _rX); stream.Save("rY", _rY); stream.Save("rZ", _rZ); stream.Save("scale", _scale); }
public void Save(IPersistStream stream) { stream.Save("Type", (int)_type); if (_type == NodeType.query) { stream.Save("Name", base.Text); stream.Save("PromptDefs", _table); foreach (TreeNode node in Nodes) { if (!(node is QueryThemeTable)) { continue; } stream.Save("Table", node); } } }
public void Save(IPersistStream stream) { if (_minScale != 0.0) { stream.Save("MinScale", _minScale); } if (_maxScale != 0.0) { stream.Save("MaxScale", _maxScale); } stream.Save("Symbol", _symbol); stream.Save("FilterType", (int)_filterType); if (_filter != null) { stream.Save("Filter", _filter); } }
public void Save(IPersistStream stream) { if (_module == null || !(_module is IPersistable)) { return; } stream.Save("GUID", PlugInManager.PlugInID(_module).ToString()); ((IPersistable)_module).Save(stream); }
public void Save(IPersistStream stream) { foreach (ILabelRenderer renderer in _renderers) { if (renderer == null) { continue; } stream.Save("ScaleRenderer", new ScaleRendererPersist(renderer as ScaleRenderer)); } }
public void Save(IPersistStream stream) { foreach (IGraphicElement grElement in _elements) { if (PlugInManager.IsPlugin(grElement) && grElement is IPersistable) { stream.Save("GraphicElement", grElement); } } }
public void Save(IPersistStream stream) { if (_ageometry == null || stream == null) { return; } for (int i = 0; i < _ageometry.GeometryCount; i++) { stream.Save("Geometry", new PersistableGeometry(_ageometry[i])); } }
public void Save(IPersistStream stream) { if (_polygon == null || stream == null) { return; } for (int i = 0; i < _polygon.RingCount; i++) { stream.Save("Ring", new PersistablePointCollection(_polygon[i])); } }
public void Save(IPersistStream stream) { if (_polyline == null || stream == null) { return; } for (int i = 0; i < _polyline.PathCount; i++) { stream.Save("Path", new PersistablePointCollection(_polyline[i])); } }
public void Save(IPersistStream stream) { if (stream == null || _module?.Map == null) { return; } stream.Save("index", 0); stream.Save("name", _module.Map.Name); foreach (IEditLayer editLayer in _module.EditLayers) { if (editLayer == null) { continue; } stream.Save("EditLayer", editLayer); } }
public void Save(IPersistStream stream) { if (_application == null) return; foreach (ITool tool in _application.Tools) { if (!(tool is IPersistable)) continue; stream.Save("Tool", new ToolPersist(tool)); } }
public void Save(IPersistStream stream) { stream.Save("focusMapIndex", _focusMapIndex); foreach (IMap map in _maps) { stream.Save("IMap", map); } //if (this.Application is IGUIApplication) //{ // stream.Save("Moduls", new ModulsPersists(this.Application as IMapApplication)); // stream.Save("Tools", new ToolsPersist(this.Application as IGUIApplication)); // stream.Save("Toolbars", new ToolbarsPersist(this.Application as IGUIApplication)); //} if (_tableRelations != null) { stream.Save("TableRelations", _tableRelations); } }
public void Save(IPersistStream stream) { PropertyInfo[] props_of_class = this.GetType().GetProperties(); foreach (CustomProperty property in _propertyCollection) { if (property.propValueObject is XmlStreamObject) { stream.Save(property.Name, property.propValueObject); } else { stream.Save(property.Name, property.GetValue(this)); } } foreach (PersistableClass child in _childClasses) { stream.Save(child.Name, child); } }
public void Save(IPersistStream stream) { if (_pColl == null) { return; } for (int i = 0; i < _pColl.PointCount; i++) { stream.Save("v", new PersistablePoint(_pColl[i])); } }
public void Save(IPersistStream stream) { if (_queries == null) { return; } foreach (QueryTheme theme in _queries) { stream.Save("Query", theme); } }
public static byte[] SaveLayerToStream(ILayer paramLayer) { byte[] buffer = null; if (paramLayer is IPersistStream) { IPersistStream stream = paramLayer as IPersistStream; XMLStream class2 = new XMLStream(); stream.Save((IStream)class2, 0); buffer = class2.SaveToBytes(); } return(buffer); }
public void Save(IPersistStream stream) { if (_polyline == null || _polyline.PathCount != 1) { return; } for (int i = 0; i < _polyline[0].PointCount; i++) { stream.Save("Point", _polyline[0][i]); } }
public void Save(IPersistStream stream) { if (_row == null || _row.Table == null || _row.Table.Columns == null) { return; } foreach (DataColumn col in _row.Table.Columns) { stream.Save(col.ColumnName, _row[col.ColumnName]); } }
public void Save(IPersistStream stream) { base.Save(stream); stream.Save("color", this.Color.ToArgb()); stream.Save("width", this.Width); stream.Save("dashstyle", (int)this.DashStyle); stream.Save("linescap", (int)this.LineStartCap); stream.Save("lineecap", (int)this.LineEndCap); stream.Save("maxwidth", (float)this.MaxPenWidth); stream.Save("minwidth", (float)this.MinPenWidth); stream.Save("widthunit", (int)this.PenWidthUnit); }
public void Save(IPersistStream stream) { if (_geometry == null || stream == null) { return; } if (_geometry is IPoint) { stream.Save("Point", new PersistablePoint(_geometry as IPoint)); } else if (_geometry is IMultiPoint) { stream.Save("Multipoint", new PersistablePointCollection(_geometry as IMultiPoint)); } else if (_geometry is IPolyline) { stream.Save("Polyline", new PersistablePolyline(_geometry as IPolyline)); } else if (_geometry is Polygon) { stream.Save("Polygon", new PersistablePolygon(_geometry as IPolygon)); } else if (_geometry is IEnvelope) { stream.Save("Envelope", new PersistableEnvelope(_geometry as IEnvelope)); } else if (_geometry is IAggregateGeometry) { stream.Save("AggregateGeometry", new PersistableAggregateGeometry(_geometry as IAggregateGeometry)); } }
public void Save(IPersistStream stream) { stream.Save("Lon", _lon); stream.Save("Lat", _lat); stream.Save("h", _h); stream.Save("Speed", _speed); stream.Save("PDOP", _pdop); stream.Save("VDOP", _vdop); stream.Save("HDOP", _hdop); }
public void Save(IPersistStream stream) { base.Save(stream); if (this.StartCapPointSymbol != null) { stream.Save("startcappointsymbol", this.StartCapPointSymbol); } if (this.EndCapPointSymbol != null) { stream.Save("endcappointsymbol", this.EndCapPointSymbol); } if (this.LineSymbol != null) { stream.Save("linesymbol", this.LineSymbol); } stream.Save("rotatestartsymbol", this.RotateStartSymbol); stream.Save("rotateendsymbol", this.RotateEndSymbol); }
virtual public void WriteMetadata(IPersistStream stream) { PlugInManager plugins = new PlugInManager(); if (_providers != null) { foreach (IMetadataProvider provider in _providers) { if (provider == null) continue; // mit ApplyTo noch einmal das this Objekt auf den Provider // setzen, damit beim speichern immer das aktuelle Object gesetzt wird... provider.ApplyTo(this); stream.Save("IMetadataProvider", provider); } } else { _providers = new List<IMetadataProvider>(); } foreach (XmlNode providerNode in plugins.GetPluginNodes(Plugins.Type.IMetadataProvider)) { IMetadataProvider provider = plugins.CreateInstance(providerNode) as IMetadataProvider; if (provider == null) continue; // nach bereits vorhanden suchen... IMetadataProvider provider2 = this.MetadataProvider(PlugInManager.PlugInID(provider)); if (provider2 != null) continue; if (provider.ApplyTo(this)) { stream.Save("IMetadataProvider", provider); _providers.Add(provider); } } }
public void Save(IPersistStream stream) { if (_application == null) return; PlugInManager compMan=new PlugInManager(); foreach (XmlNode comp in compMan.GetPluginNodes(Plugins.Type.IMapApplicationModule)) { IMapApplicationModule module = _application.IMapApplicationModule(PlugInManager.Guid(comp)); if (module is IPersistable) { stream.Save("Module", new ModulePersist(module)); } } }
public void Save(IPersistStream stream) { if (_application == null) return; List<IToolbar> toolbars=_application.Toolbars; toolbars.Sort(new ToolbarPositionComparer()); foreach (IToolbar toolbar in toolbars) { if (!(toolbar is IPersistable)) continue; stream.Save("Toolbar", new ToolbarPersist(toolbar)); } }
public void Save(IPersistStream stream) { base.Save(stream); if (this.PointSymbol != null) { stream.Save("pointsymbol", this.PointSymbol); } if (this.LineSymbol != null) { stream.Save("linesymbol", this.LineSymbol); } stream.Save("drawstartpoint", this.DrawStartPoint); stream.Save("drawendpoint", this.DrawEndPoint); stream.Save("drawsteppoints", this.DrawStepPoints); stream.Save("stepwidth", this.StepWidth); stream.Save("stepwidthunit", (int)this.StepWidthUnit); stream.Save("usesymbolrotation", this.UseSymbolRotation); stream.Save("stepstartpos", this.StepStartPos); stream.Save("symbolmaxdistance", this.SymbolMaxDistance); }
public void Save(IPersistStream stream) { stream.Save("SrsCode", _srsCode); stream.Save("GetMapFormat", _getMapInfo); stream.Save("GetFeatureInfoFormat", _getFeatureInfo); stream.Save("SrsCodes", new XmlStreamStringArray(_srsCodes)); stream.Save("GetMapFormats", new XmlStreamStringArray(_getMapInfos)); stream.Save("GetFeatureInfoFormat", new XmlStreamStringArray(_getFeatureInfos)); }
public void Save(IPersistStream stream) { stream.Save("UsePointSymbol", _usePointSymbol); stream.Save("UseLineSymbol", _useLineSymbol); stream.Save("UsePolygonSymbol", _usePolygonSymbol); stream.Save("PointSymbol", _pointSymbol); stream.Save("LineSymbol", _lineSymbol); stream.Save("PolygonSymbol", _polygonSymbol); }
public void Save(IPersistStream stream) { if (_doc == null || _doc.Maps == null) { return; } foreach (IMap map in _doc.Maps) { if (map == null) { continue; } stream.Save("MapEditLayers", new MapEditLayerPersist(this, map)); } }
public void Save(IPersistStream stream) { if (_colorClasses != null) { foreach (GridColorClass cc in _colorClasses) { stream.Save("GridClass", cc); } } stream.Save("UseHillShade", _useHillShade); stream.Save("HillShadeDx", _hillShadeVector[0]); stream.Save("HillShadeDy", _hillShadeVector[1]); stream.Save("HillShadeDz", _hillShadeVector[2]); stream.Save("UseIgnoreData", _useNoDataValue); stream.Save("IgnoreData", _noDataValue); stream.Save("RenderRawGridValues", _renderRawGridValues); }
internal static byte[] PersistIPersistStreamToByteArray(IPersistStream persistableObject) { byte[] buffer; IStream pStm = SafeNativeMethods.CreateStreamOnHGlobal(SafeHGlobalHandle.InvalidHandle, false); try { persistableObject.Save(pStm, true); SafeHGlobalHandle hGlobalFromStream = SafeNativeMethods.GetHGlobalFromStream(pStm); if ((hGlobalFromStream == null) || (IntPtr.Zero == hGlobalFromStream.DangerousGetHandle())) { throw Fx.AssertAndThrow("HGlobal returned from GetHGlobalFromStream is NULL"); } buffer = ConvertHGlobalToByteArray(hGlobalFromStream); } finally { Marshal.ReleaseComObject(pStm); } return buffer; }