Exemple #1
0
 void UCGbalFirRevise_Disposed(object sender, EventArgs e)
 {
     if (_vectorMapHostLayer != null)
     {
         (_vectorMapHostLayer as VectorHostLayer).Dispose();
         _vectorMapHostLayer = null;
     }
     if (_geoGridLayer != null)
     {
         _geoGridLayer.Dispose();
         _geoGridLayer = null;
     }
     if (this.canvasHost1 != null)
     {
         this.canvasHost1.Canvas.Dispose();
         this.canvasHost1.Dispose();
     }
 }
 void UCSimpleMapControl_Disposed(object sender, EventArgs e)
 {
     if (_objHosts != null && _objHosts.Count != 0)
     {
         foreach (string key in _objHosts.Keys)
         {
             ISimpleVectorObjectHost host = _objHosts[key];
             if (host != null)
             {
                 host.Dispose();
             }
         }
         _objHosts.Clear();
     }
     if (_aoiContainer != null)
     {
         (_aoiContainer as AOIContainerLayer).Dispose();
         _aoiContainer = null;
     }
     if (_vectorHostLayer != null)
     {
         (_vectorHostLayer as VectorHostLayer).Dispose();
         _vectorHostLayer = null;
     }
     if (_geoGridLayer != null)
     {
         _geoGridLayer.Dispose();
         _geoGridLayer = null;
     }
     if (canvasHost1 != null)
     {
         canvasHost1.Canvas.Dispose();
         canvasHost1.Dispose();
         //canvasHost1 = null;
     }
 }