public static void OnBrowseRaster(System.Windows.Forms.TextBox txt, naru.ui.PathEventArgs e) { if (GISLayerBrowsingEventHandler != null) { ProjectManager.GISLayerBrowsingEventHandler(txt, e); } }
public static GCDConsoleLib.Raster BrowseRaster(string formTitle, IntPtr parentWindow) { FileInfo path = null; if (IsArcMap) { if (GISLayerBrowsingEventHandler != null) { naru.ui.PathEventArgs e = new naru.ui.PathEventArgs(path, formTitle, parentWindow); ProjectManager.GISLayerBrowsingEventHandler(null, e); if (e.Path is FileInfo) { path = e.Path; } } } else { path = naru.os.File.BrowseOpenFile(formTitle, "Raster Files (*.tif, *.tiff, *.img)|*.tif;*.tiff;*.img"); } GCDConsoleLib.Raster raster = null; if (path is FileInfo) { raster = new GCDConsoleLib.Raster(path); } return(raster); }