Пример #1
0
        private void ShowSingleModelTreeMenuItem_Click(object sender, EventArgs e)
        {
            TreeNode node = treeContexMenue.Tag as TreeNode;
            GSOFeature feature = node.Tag as GSOFeature;
            if (feature != null && feature.Geometry != null && feature.Geometry.Type == EnumGeometryType.GeoModel)
            {
                FrmShowSingleModel dlg = new FrmShowSingleModel();
                dlg.Show(this);

                GSOFeature newFeature = feature.Clone();
                newFeature.Geometry.LatLonCoord = false;
                newFeature.HighLight = false;
                ((GSOGeoModel)newFeature.Geometry).SetPosition(0, 0, 0);

                dlg.plane3DControl.Plane3DScene.AddFeature(newFeature);
            }
        }
Пример #2
0
        //展示单个模型
        private void MenuItemShowSingleModel_Click(object sender, EventArgs e)
        {
            if (globeControl1.Globe.SelectedObject == null)
            {
                MessageBox.Show("请先选择一个模型!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            GSOFeature modelFeature = globeControl1.Globe.SelectedObject;
            if (modelFeature.Geometry == null || modelFeature.Geometry.Type != EnumGeometryType.GeoModel)
            {
                MessageBox.Show("请先选择一个模型!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;

            }

            FrmShowSingleModel dlg = new FrmShowSingleModel();
            dlg.Show(this);

            GSOFeature newFeature = modelFeature.Clone();
            newFeature.Geometry.LatLonCoord = false;

            newFeature.HighLight = false;
            ((GSOGeoModel)newFeature.Geometry).SetPosition(0, 0, 0);
            dlg.plane3DControl.Plane3DScene.AddFeature(newFeature);
        }