Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
        //天际线分析
        private void SkylineAnalysis_ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.panelDiagram.Visible = false;

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


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