public void SetTabControl()
        {
            if (m_Feature != null)
            {
                tabControlMain.TabPages.Clear();
                textBoxName.Text  = m_Feature.Name;
                checkBox1.Checked = m_Feature.Visible;

                if (m_Feature.Geometry != null)
                {
                    // 属性信息页面
                    if (m_Feature.Geometry.Type != EnumGeometryType.GeoPolyline3D)
                    {
                        m_CtrlFeatureAttribute = new CtrlFeatureAttribute(m_Feature, m_GlobeControl);
                        AddNewCtrlPage(m_CtrlFeatureAttribute, "tabAttribute", "属性信息");
                    }

                    switch (m_Feature.Geometry.Type)
                    {
                    case EnumGeometryType.GeoParticle:
                    {
                        InsertNewCtrlPage(0, new CtrlParticleParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                    }
                    break;

                    case EnumGeometryType.GeoMarker:
                    case EnumGeometryType.GeoDynamicMarker:
                    {
                        InsertNewCtrlPage(0, new CtrlMarkerTextPage(m_Feature.Geometry, m_GlobeControl), "tabMarkerText", "标注内容");
                    }
                    break;

                    case EnumGeometryType.GeoModel:
                    {
                        m_CtrlModePathPage = new CtrlModelPathPage(m_Feature, m_GlobeControl);
                        InsertNewCtrlPage(0, m_CtrlModePathPage, "tabModelPath", "模型路径");
                    }
                    break;

                    case EnumGeometryType.GeoFountain:
                    {
                        InsertNewCtrlPage(0, new CtrlFountainParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                    }
                    break;

                    case EnumGeometryType.GeoWater:
                    {
                        InsertNewCtrlPage(0, new FrmWaterParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                    }
                    break;

                    case EnumGeometryType.GeoSphereEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlSphereEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                    }
                    break;

                    case EnumGeometryType.GeoBoxEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlBoxEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                        this.Text = "长方体";
                    }
                    break;

                    case EnumGeometryType.GeoCylinderEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlCylinderEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                        this.Text = "柱";
                    }
                    break;

                    case EnumGeometryType.GeoFrustumEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlFrustumEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                        this.Text = "台";
                    }
                    break;

                    case EnumGeometryType.GeoEllipsoidEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlEllipsoidEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                        this.Text = "椭球";
                    }
                    break;

                    case EnumGeometryType.GeoEllipCylinderEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlEllipCylinderEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                        this.Text = "椭圆柱";
                    }
                    break;

                    case EnumGeometryType.GeoEllipFrustumEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlEllipFrustumEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                        this.Text = "椭圆台";
                    }
                    break;

                    case EnumGeometryType.GeoRangeEllipsoidEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlRangeEllipsoidEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                        this.Text = "缺口椭球";
                    }
                    break;

                    case EnumGeometryType.GeoRangeEllipCylinderEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlRangeEllipCylinderEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                        this.Text = "缺口椭圆柱";
                    }
                    break;

                    case EnumGeometryType.GeoRangeEllipFrustumEntity:
                    {
                        InsertNewCtrlPage(0, new CtrlRangeEllipFrustumEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                        this.Text = "缺口椭圆台";
                    }
                    break;
                    }

                    // 空间信息页面
                    if (m_Feature.Geometry.IsEntity)
                    {
                        CtrlEntitySpaceInfo curCtrlEntitySpaceInfo = new CtrlEntitySpaceInfo(m_Feature, m_GlobeControl);
                        AddNewCtrlPage(curCtrlEntitySpaceInfo, "tabSpaceInfo", "空间信息");
                        if (m_CtrlModePathPage != null)
                        {
                            // 这里要设置关联一下,否则模型设置路径后里面的空间信息参数不能跟着更新
                            m_CtrlModePathPage.m_SpaceCtrl = curCtrlEntitySpaceInfo;
                        }
                        AddNewCtrlPage(new CtrlEntityStylePage(m_Feature, m_GlobeControl), "tabStyle", "风格");
                    }
                    else
                    {
                        switch (m_Feature.Geometry.Type)
                        {
                        case EnumGeometryType.GeoPoint3D:
                        case EnumGeometryType.GeoDynamicPoint3D:
                        case EnumGeometryType.GeoMarker:
                        case EnumGeometryType.GeoDynamicMarker:
                        {
                            AddNewCtrlPage(new CtrlPoint3DSpaceInfo(m_Feature.Geometry, m_GlobeControl), "tabSpaceInfo", "空间信息");
                            if (m_Feature.Geometry.Type == EnumGeometryType.GeoMarker ||
                                m_Feature.Geometry.Type == EnumGeometryType.GeoDynamicMarker)
                            {
                                AddNewCtrlPage(new CtrlMarkerStylePage(m_Feature.Geometry, m_GlobeControl), "tabStyle", "风格");
                            }
                        }
                        break;

                        case EnumGeometryType.GeoPolyline3D:
                        {
                            AddNewCtrlPage(new CtrlPolylineSpaceInfo(m_Feature.Geometry, m_Feature, mlayer, m_GlobeControl), "tabSpaceInfo", "空间信息");
                            AddNewCtrlPage(new CtrlLineStylePage(m_Feature.Geometry, m_Feature, mlayer, m_GlobeControl), "tabStyle", "风格");
                            if (m_Feature.GetFieldCount() > 0)
                            {
                                AddNewCtrlPage(new CtrlLineFieldsValuePage(m_Feature, mlayer, m_GlobeControl), "tabFieldsValue", "字段值");
                            }
                        }
                        break;

                        case EnumGeometryType.GeoPolygon3D:
                        case EnumGeometryType.GeoWater:
                        {
                            AddNewCtrlPage(new CtrlPolylineSpaceInfo(m_Feature.Geometry, m_GlobeControl), "tabSpaceInfo", "空间信息");
                            AddNewCtrlPage(new CtrlPolygonStylePage(m_Feature, m_GlobeControl), "tabStyle", "风格");
                            AddNewCtrlPage(new CtrlExtrudePage(m_Feature.Geometry, m_GlobeControl), "tabExtrude", "拉伸");
                        }
                        break;
                        }
                    }
                    if (m_Feature.Geometry.Type != EnumGeometryType.GeoPolyline3D)
                    {
                        m_CtrlGeometryCameraState = new CtrlGeometryCameraState(m_Feature, m_GlobeControl);
                        AddNewCtrlPage(m_CtrlGeometryCameraState, "tabCameraState", "定位参数");
                    }
                }
            }

            // 设置当前tab页面为第一个
            tabControlMain.SelectedIndex = 0;
        }
Example #2
0
        public void SetTabControl()
        {
            if (m_Feature != null)
            {
                tabControlMain.TabPages.Clear();
                textBoxName.Text = m_Feature.Name;
                checkBox1.Checked = m_Feature.Visible;

                if (m_Feature.Geometry != null)
                {
                    // 属性信息页面
                    if (m_Feature.Geometry.Type != EnumGeometryType.GeoPolyline3D)
                    {
                        m_CtrlFeatureAttribute = new CtrlFeatureAttribute(m_Feature, m_GlobeControl);
                        AddNewCtrlPage(m_CtrlFeatureAttribute, "tabAttribute", "属性信息");
                    }

                    switch (m_Feature.Geometry.Type)
                    {
                        case EnumGeometryType.GeoParticle:
                            {
                                InsertNewCtrlPage(0, new CtrlParticleParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                            }
                            break;
                        case EnumGeometryType.GeoMarker:
                        case EnumGeometryType.GeoDynamicMarker:
                            {
                                InsertNewCtrlPage(0, new CtrlMarkerTextPage(m_Feature.Geometry, m_GlobeControl), "tabMarkerText", "标注内容");
                            }
                            break;
                        case EnumGeometryType.GeoModel:
                            {
                                m_CtrlModePathPage = new CtrlModelPathPage(m_Feature, m_GlobeControl);
                                InsertNewCtrlPage(0, m_CtrlModePathPage, "tabModelPath", "模型路径");
                            }
                            break;
                        case EnumGeometryType.GeoFountain:
                            {
                                InsertNewCtrlPage(0, new CtrlFountainParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                            }
                            break;
                        case EnumGeometryType.GeoWater:
                            {
                                InsertNewCtrlPage(0, new FrmWaterParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                            }
                            break;
                        case EnumGeometryType.GeoSphereEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlSphereEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                            }
                            break;
                        case EnumGeometryType.GeoBoxEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlBoxEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                                this.Text = "长方体";
                            }
                            break;
                        case EnumGeometryType.GeoCylinderEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlCylinderEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                                this.Text = "柱";
                            }
                            break;
                        case EnumGeometryType.GeoFrustumEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlFrustumEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                                this.Text = "台";
                            }
                            break;
                        case EnumGeometryType.GeoEllipsoidEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlEllipsoidEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                                this.Text = "椭球";
                            }
                            break;
                        case EnumGeometryType.GeoEllipCylinderEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlEllipCylinderEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                                this.Text = "椭圆柱";
                            }
                            break;
                        case EnumGeometryType.GeoEllipFrustumEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlEllipFrustumEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                                this.Text = "椭圆台";
                            }
                            break;
                        case EnumGeometryType.GeoRangeEllipsoidEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlRangeEllipsoidEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                                this.Text = "缺口椭球";
                            }
                            break;
                        case EnumGeometryType.GeoRangeEllipCylinderEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlRangeEllipCylinderEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                                this.Text = "缺口椭圆柱";
                            }
                            break;
                        case EnumGeometryType.GeoRangeEllipFrustumEntity:
                            {
                                InsertNewCtrlPage(0, new CtrlRangeEllipFrustumEntityParamPage(m_Feature.Geometry, m_GlobeControl), "tabParam", "参数");
                                this.Text = "缺口椭圆台";
                            }
                            break;
                    }

                    // 空间信息页面
                    if (m_Feature.Geometry.IsEntity)
                    {
                        CtrlEntitySpaceInfo curCtrlEntitySpaceInfo = new CtrlEntitySpaceInfo(m_Feature, m_GlobeControl);
                        AddNewCtrlPage(curCtrlEntitySpaceInfo, "tabSpaceInfo", "空间信息");
                        if (m_CtrlModePathPage != null)
                        {
                            // 这里要设置关联一下,否则模型设置路径后里面的空间信息参数不能跟着更新
                            m_CtrlModePathPage.m_SpaceCtrl = curCtrlEntitySpaceInfo;
                        }
                        AddNewCtrlPage(new CtrlEntityStylePage(m_Feature, m_GlobeControl), "tabStyle", "风格");
                    }
                    else
                    {
                        switch (m_Feature.Geometry.Type)
                        {
                            case EnumGeometryType.GeoPoint3D:
                            case EnumGeometryType.GeoDynamicPoint3D:
                            case EnumGeometryType.GeoMarker:
                            case EnumGeometryType.GeoDynamicMarker:
                                {
                                    AddNewCtrlPage(new CtrlPoint3DSpaceInfo(m_Feature.Geometry, m_GlobeControl), "tabSpaceInfo", "空间信息");
                                    if (m_Feature.Geometry.Type == EnumGeometryType.GeoMarker ||
                                        m_Feature.Geometry.Type == EnumGeometryType.GeoDynamicMarker)
                                    {
                                        AddNewCtrlPage(new CtrlMarkerStylePage(m_Feature.Geometry, m_GlobeControl), "tabStyle", "风格");
                                    }
                                }
                                break;
                            case EnumGeometryType.GeoPolyline3D:
                                {
                                    AddNewCtrlPage(new CtrlPolylineSpaceInfo(m_Feature.Geometry, m_Feature, mlayer, m_GlobeControl), "tabSpaceInfo", "空间信息");
                                    AddNewCtrlPage(new CtrlLineStylePage(m_Feature.Geometry, m_Feature, mlayer, m_GlobeControl), "tabStyle", "风格");
                                    if (m_Feature.GetFieldCount() > 0)
                                    {
                                        AddNewCtrlPage(new CtrlLineFieldsValuePage(m_Feature, mlayer, m_GlobeControl), "tabFieldsValue", "字段值");
                                    }
                                }
                                break;
                            case EnumGeometryType.GeoPolygon3D:
                            case EnumGeometryType.GeoWater:
                                {
                                    AddNewCtrlPage(new CtrlPolylineSpaceInfo(m_Feature.Geometry, m_GlobeControl), "tabSpaceInfo", "空间信息");
                                    AddNewCtrlPage(new CtrlPolygonStylePage(m_Feature, m_GlobeControl), "tabStyle", "风格");
                                    AddNewCtrlPage(new CtrlExtrudePage(m_Feature.Geometry, m_GlobeControl), "tabExtrude", "拉伸");
                                }
                                break;
                        }
                    }
                    if (m_Feature.Geometry.Type != EnumGeometryType.GeoPolyline3D)
                    {
                        m_CtrlGeometryCameraState = new CtrlGeometryCameraState(m_Feature, m_GlobeControl);
                        AddNewCtrlPage(m_CtrlGeometryCameraState, "tabCameraState", "定位参数");
                    }
                }
            }

            // 设置当前tab页面为第一个
            tabControlMain.SelectedIndex = 0;
        }