コード例 #1
0
        private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (m_dlgShadowAnalysis != null)
            {
                m_dlgShadowAnalysis.Dispose();
                m_dlgShadowAnalysis = null;
            }
            if (m_dlgSightline != null)
            {
                m_dlgSightline.Dispose();
                m_dlgSightline = null;
            }
            if (m_dlgSkyline != null)
            {
                m_dlgSkyline.Dispose();
                m_dlgSkyline = null;
            }
            if (m_dlgProfileAnalysis != null)
            {
                m_dlgProfileAnalysis.Dispose();
                m_dlgProfileAnalysis = null;
            }

            if (m_dlgSunTrajectory != null)
            {
                m_dlgSunTrajectory.Dispose();
                m_dlgSunTrajectory = null;
            }
            if (m_dlgFloodAnalysis != null)
            {
                m_dlgFloodAnalysis.Dispose();
                m_dlgFloodAnalysis = null;
            }

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

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

            if (m_dlgSlopeMap != null)
            {
                m_dlgSlopeMap.Dispose();
                m_dlgSlopeMap = null;
            }
            this.m_sceneControl.Scene.Close();
            this.workspace.Datasources.CloseAll();
            m_sceneControl.Dispose();
        }
コード例 #2
0
        //等高线分析
        private void ContourAnalysis_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.panelDiagram.Visible = false;

            if (m_sceneControl.Scene.Name != "BeiJingDem")
            {
                m_sceneControl.Scene.Layers.Clear();
                m_sceneControl.Scene.TerrainLayers.Clear();
                m_sceneControl.Scene.Open("BeiJingDem");
            }
            if (m_dlgContourMap == null || m_dlgContourMap.IsDisposed)
            {
                m_dlgContourMap = new DlgContourMap();
            }
            m_dlgContourMap.setWorkspace(workspace);
            m_dlgContourMap.SetSceneControl(this.m_sceneControl);
            m_dlgContourMap.Show();

            //刷新场景,保证数据更新出来
            m_sceneControl.Scene.Refresh();
        }