Esempio n. 1
0
        private void rasterPropertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (grdData.SelectedRows.Count < 1)
            {
                return;
            }

            if (grdData.SelectedRows[0].DataBoundItem is GridViewGCDProjectItem)
            {
                GridViewGCDProjectItem             propItem = (GridViewGCDProjectItem)grdData.SelectedRows[0].DataBoundItem;
                SurveyLibrary.frmSurfaceProperties frm      = new SurveyLibrary.frmSurfaceProperties((GCDProjectRasterItem)propItem.ProjectItem, false);
                frm.ShowDialog();
            }
        }
Esempio n. 2
0
        public void OnEdit(object sender, EventArgs e)
        {
            TreeNodeItem node = sender as TreeNodeItem;
            Form         frm  = null;

            if (Item is AssocSurface)
            {
                AssocSurface assoc = Item as AssocSurface;
                frm = new SurveyLibrary.frmAssociatedSurface(assoc.DEM, assoc);
            }
            else if (Item is ErrorSurface && ((ErrorSurface)Item).Surf is DEMSurvey)
            {
                ErrorSurface err = Item as ErrorSurface;
                if (err.ErrorProperties.Count < 1)
                {
                    frm = new SurveyLibrary.frmSurfaceProperties(Item as GCDProjectRasterItem, true);
                }
                else
                {
                    if (err.Mask == null)
                    {
                        frm = new SurveyLibrary.ErrorSurfaces.frmSingleMethodError(err);
                    }
                    else
                    {
                        frm = new SurveyLibrary.ErrorSurfaces.frmMultiMethodError(err);
                    }
                }
            }
            else if (Item is GCDCore.Project.ProfileRoutes.ProfileRoute)
            {
                GCDCore.Project.ProfileRoutes.ProfileRoute route = Item as GCDCore.Project.ProfileRoutes.ProfileRoute;
                frm = new UserInterface.ProfileRoutes.frmProfileRouteProperties(route.ProfileRouteType, route);
            }
            else if (Item is GCDCore.Project.Masks.DirectionalMask)
            {
                frm = new Masks.frmDirectionalMaskProps(Item as GCDCore.Project.Masks.DirectionalMask);
            }
            else if (Item is GCDCore.Project.Masks.AOIMask)
            {
                frm = new Masks.frmAOIProperties(Item as GCDCore.Project.Masks.AOIMask);
            }
            else if (Item is GCDCore.Project.Masks.RegularMask)
            {
                frm = new Masks.frmMaskProperties(Item as GCDCore.Project.Masks.RegularMask);
            }
            else if (Item is GCDCore.Project.LinearExtraction.LinearExtraction)
            {
                frm = new LinearExtraction.frmLinearExtractionProperties(Item as GCDCore.Project.LinearExtraction.LinearExtraction);
            }
            else
            {
                // Generic raster properties form
                if (Item is GCDProjectRasterItem)
                {
                    frm = new SurveyLibrary.frmSurfaceProperties(Item as GCDProjectRasterItem, true);
                }
                else
                {
                    throw new NotImplementedException("Unhandled editing of project type");
                }
            }

            if (frm is Form)
            {
                EditTreeItem(frm);
            }
        }