public static ESRI.ArcGIS.Carto.IFeatureRenderer LoadRendererFromByte(byte[] _RendererValue, string _RendererType) { if (_RendererValue == null || _RendererValue.Length == 0) { return(null); } try { enumRendererType pRendererType = (enumRendererType)Enum.Parse(typeof(enumRendererType), _RendererType); ESRI.ArcGIS.Carto.IFeatureRenderer pRenderer = null; switch (pRendererType) { case enumRendererType.SimpleRenderer: pRenderer = new ESRI.ArcGIS.Carto.SimpleRendererClass(); break; case enumRendererType.UniqueValueRenderer: pRenderer = new ESRI.ArcGIS.Carto.UniqueValueRendererClass(); break; case enumRendererType.BreakColorRenderer: pRenderer = new ESRI.ArcGIS.Carto.ClassBreaksRendererClass(); break; case enumRendererType.BreakSizeRenderer: pRenderer = new ESRI.ArcGIS.Carto.ClassBreaksRendererClass(); break; } if (pRenderer == null) { return(null); } IMemoryBlobStreamVariant pMemoryBlobStreamVariant = new MemoryBlobStreamClass(); pMemoryBlobStreamVariant.ImportFromVariant((object)_RendererValue); IStream pStream = pMemoryBlobStreamVariant as IStream; IPersistStream pPersistStream = pRenderer as IPersistStream; pPersistStream.Load(pStream); pRenderer = pPersistStream as ESRI.ArcGIS.Carto.IFeatureRenderer; return(pRenderer); } catch (Exception ex) { return(null); } }
public override void InitRendererObject(ESRI.ArcGIS.Carto.IFeatureRenderer _Renderer, esriSymbologyStyleClass _SymbologyStyleClass) { throw new Exception("The method or operation is not implemented."); }