示例#1
0
        public SplitDlg()
        {
            DF3DApplication app = DF3DApplication.Application;

            if (app == null || app.Current3DMapControl == null || app.Workbench == null)
            {
                return;
            }
            this.InitializeComponent();
            app.Workbench.SetMenuEnable(false);
            this._interactaMode = app.Current3DMapControl.InteractMode;
            app.Current3DMapControl.InteractMode = gviInteractMode.gviInteractNormal;
            GeometryEdit.Instance().SpatialQueryEditStopEvent += new SpatialQueryEditStopHandle(this.SpatialQueryEditStopEvent);
        }
示例#2
0
        private void SplitDlg_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
        {
            DF3DApplication app = DF3DApplication.Application;

            if (app == null || app.Current3DMapControl == null)
            {
                return;
            }
            this.DeleteRenderGeo(ref this._renderGeo);
            app.Current3DMapControl.HighlightHelper.SetRegion(null);
            app.Workbench.SetMenuEnable(true);
            GeometryEdit.Instance().SpatialQueryEditStopEvent -= new SpatialQueryEditStopHandle(this.SpatialQueryEditStopEvent);
            app.Current3DMapControl.InteractMode = this._interactaMode;
        }
示例#3
0
        private void GeometryEditorStopEvent(bool bSave)
        {
            DF3DApplication app = DF3DApplication.Application;

            if (app == null || app.Current3DMapControl == null)
            {
                return;
            }
            RenderControlEditServices.Instance().RenderEditorType = RenderEditorType.UnKnownType;
            if (app.Current3DMapControl.ObjectEditor.IsEditing)
            {
                GeometryEdit.Instance().StopEdit(bSave);
            }
        }
示例#4
0
        private void SetMakePolygonMode()
        {
            DF3DApplication app = DF3DApplication.Application;

            if (app == null || app.Current3DMapControl == null)
            {
                return;
            }
            this.textEdit_FilePath.Text = string.Empty;
            this.DeleteRenderGeo(ref this._renderGeo);
            app.Current3DMapControl.HighlightHelper.SetRegion(null);
            IGeometryFactory geometryFactory = new GeometryFactoryClass();

            if (this.radioGroup1.SelectedIndex == 1)
            {
                base.WindowState = System.Windows.Forms.FormWindowState.Minimized;
                this.textEdit_FilePath.Enabled = false;
                this.sbtn_BrowseFile.Enabled   = false;
                IPolygon polygon = geometryFactory.CreateGeometry(gviGeometryType.gviGeometryPolygon, gviVertexAttribute.gviVertexAttributeZ) as IPolygon;
                polygon.SpatialCRS = CommonUtils.Instance().GetCurrentFeatureDataset().SpatialReference;
                ISurfaceSymbol surfaceSymbol = new SurfaceSymbolClass();
                surfaceSymbol.Color          = 1442840448u;
                surfaceSymbol.BoundarySymbol = new CurveSymbolClass
                {
                    Color = 1442840448u
                };
                this._renderGeo = app.Current3DMapControl.ObjectManager.CreateRenderPolygon(polygon, surfaceSymbol, app.Current3DMapControl.ProjectTree.RootID);
                GeometryEdit.Instance().GeometryEditStart(this._renderGeo);
            }
            else
            {
                if (this.radioGroup1.SelectedIndex == 0)
                {
                    this.textEdit_FilePath.Enabled = true;
                    this.sbtn_BrowseFile.Enabled   = true;
                }
            }
        }
示例#5
0
 private void GeometryEditorCreateGeometryEvent(DF3DFeatureClass fcInfo, IRenderGeometry renderGeo)
 {
     RenderControlEditServices.Instance().RenderEditorType = RenderEditorType.UnKnownType;
     GeometryEdit.Instance().GeometryEditStart(fcInfo, renderGeo, gviGeoEditType.gviGeoEditCreator);
 }