Example #1
0
            public void OnGISBrowseVector(System.Windows.Forms.TextBox txt, naru.ui.PathEventArgs e, GCDConsoleLib.GDalGeometryType.SimpleTypes geometryType)
            {
                System.IO.DirectoryInfo dir = null;
                string FCName = string.Empty;

                if (e.Path is System.IO.FileInfo)
                {
                    dir    = e.Path.Directory;
                    FCName = System.IO.Path.GetFileNameWithoutExtension(e.Path.FullName);
                }

                ArcMapBrowse.BrowseGISTypes eType = ArcMapBrowse.BrowseGISTypes.Any;
                switch (geometryType)
                {
                case GCDConsoleLib.GDalGeometryType.SimpleTypes.Point: eType = ArcMapBrowse.BrowseGISTypes.Point; break;

                case GCDConsoleLib.GDalGeometryType.SimpleTypes.LineString: eType = ArcMapBrowse.BrowseGISTypes.Line; break;

                case GCDConsoleLib.GDalGeometryType.SimpleTypes.Polygon: eType = ArcMapBrowse.BrowseGISTypes.Polygon; break;
                }

                GCDConsoleLib.Vector result = ArcMapBrowse.BrowseOpenVector(e.FormTitle, dir, FCName, eType, e.hWndParent);
                if (result is GCDConsoleLib.Vector)
                {
                    txt.Text = result.GISFileInfo.FullName;
                }
            }
Example #2
0
            public void OnGISBrowseRaster(System.Windows.Forms.TextBox txt, naru.ui.PathEventArgs e)
            {
                System.IO.DirectoryInfo dir = null;
                string RasterName           = string.Empty;

                if (e.Path is System.IO.FileInfo)
                {
                    dir        = e.Path.Directory;
                    RasterName = System.IO.Path.GetFileName(e.Path.FullName);
                }

                GCDConsoleLib.Raster result = ArcMapBrowse.BrowseOpenRaster(e.FormTitle, dir, RasterName, e.hWndParent);
                if (result is GCDConsoleLib.Raster)
                {
                    e.Path = result.GISFileInfo;
                }
            }