Esempio n. 1
0
 public void Dispose()
 {
     _isDisposed = true;
     if (_map != null)
     {
         _map.Dispose();
         //_map = null;
     }
     if (_dummyBitmap != null)
     {
         _dummyBitmap.Dispose();
         _dummyBitmap = null;
     }
     if (_invertWorldTransform != null)
     {
         _invertWorldTransform.Dispose();
         _invertWorldTransform = null;
     }
     if (_worldTransform != null)
     {
         _worldTransform.Dispose();
         _worldTransform = null;
     }
     if (_gridExchanger != null)
     {
         _gridExchanger.Dispose();
         _gridExchanger = null;
     }
     if (_transformIdentity != null)
     {
         _transformIdentity.Dispose();
         _transformIdentity = null;
     }
     if (_emptyRotateMatrix != null)
     {
         _emptyRotateMatrix.Dispose();
         _emptyRotateMatrix = null;
     }
     if (_scaleBarArgs != null)
     {
         _scaleBarArgs.Dispose();
         _scaleBarArgs = null;
     }
 }
Esempio n. 2
0
 public void Apply(IMap map)
 {
     if (map == null)
     {
         return;
     }
     if (_map != null)
     {
         _map.Dispose();
         _map = null;
     }
     _map = map;
     (_map as Map).InternalInit(_projectionTransform, this as IFeatureRenderEnvironment);
     //
     if (_gridExchanger != null)
     {
         _gridExchanger.Enabled = false;
         _gridExchanger.Dispose();
         _gridExchanger = null;
     }
     //
     _gridExchanger = new RuntimeExchanger(this as IFeatureRenderEnvironment,
                                           _environment as IMapRefresh, _map.LayerContainer, _asyncDataArrivedNotify);
     //
     (_map as Map).InternalApplyLayers();
     //
     if (_conflictorForSymbol != null)
     {
         _conflictorForSymbol.Dispose();
     }
     _conflictorForSymbol = new SimpleConflictor(_map.ConflictDefForSymbol, _environment);
     if (_conflictorForLabel != null)
     {
         _conflictorForLabel.Dispose();
     }
     _conflictorForLabel = new PixelConflictor(_map.ConflictDefForLabel, _environment);
 }