/// <summary> /// Initialize the OpenRasterFileDialog. /// </summary> /// <param name="type">Type of the file dialog.</param> public RasterFileDialog(FileDialogType type) { dialog = new GxDialogClass(); IGxObjectFilterCollection filterCollection = (IGxObjectFilterCollection)dialog; IGxObjectFilter objectFilter = new RasterFormatTifFilter(); filterCollection.AddFilter(objectFilter, true); objectFilter = new RasterFormatBMPFilter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatENVIFilter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatBILFilter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatBIPFilter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatBSQFilter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatGIFFilter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatGridFilter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatImgFilter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatJP2Filter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatJPGFilter(); filterCollection.AddFilter(objectFilter, false); objectFilter = new RasterFormatPNGFilter(); filterCollection.AddFilter(objectFilter, false); this.type = type; switch (type) { case FileDialogType.Save: this.Title = "Save Raster Layer as"; break; case FileDialogType.Open: this.Title = "Open Raster Layer"; break; } }