Ejemplo n.º 1
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void PerformDispose( )
        {
            d3d.DxRender3d        -= new Direct3d.DxDirect3dDelegate(d3d_DxRender3d);
            camera.ViewChanged    -= new Camera.ViewChangedEventHandler(PerformViewChanged);
            m_project.DataChanged -= new GEMSProject.DataChangedEventHandler(OnGEMSProjectDataChanged);

            if (axisRender != null)
            {
                axisRender.Dispose( );
                axisRender = null;
            }

            if (gridRender != null)
            {
                gridRender.Dispose( );
                gridRender = null;
            }

            if (parallelRender != null)
            {
                parallelRender.Dispose( );
                parallelRender = null;
            }

            if (domainRender != null)
            {
                domainRender.Dispose( );
                domainRender = null;
            }

            if (meshRender != null)
            {
                meshRender.Dispose( );
                meshRender = null;
            }

            if (gridPointRender != null)
            {
                gridPointRender.Dispose( );
                gridPointRender = null;
            }

            foreach (GEMSSingleRender singleRender in singleRenders)
            {
                singleRender.Dispose( );
            }

            singleRenders.Clear( );
            singleRenders = null;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a parallel painter
 /// </summary>
 private void CreateParallelRender( )
 {
     if (m_project != null &&
         m_project.Parallel != null &&
         m_project.Mesh != null)
     {
         //Create the parallel information painter
         if (isParallelCreated)
         {
             parallelRender = new ParallelRender(d3d, m_project.Parallel.Clone( ), m_project.Mesh);
             parallelRender.Initialize( );
         }
     }
 }