Ejemplo n.º 1
0
        public override void OnClick()
        {
            FrmRasterImport frmFeatureClass = new FrmRasterImport();

            if (frmFeatureClass.ShowDialog() == DialogResult.OK)
            {
                bool isSucceed = GpTool.CopyRaster(WorkspaceHelper.GetGpString(frmFeatureClass.Workspace, frmFeatureClass.RasterCatalogName, frmFeatureClass.RasterDatasetName),
                                                   m_HookHelper.CurrentCatalogItem.GetGpString(), false, null);

                if (isSucceed)
                {
                    XtraMessageBox.Show("导入成功!");
                    m_HookHelper.CurrentCatalogItem.Open(true);
                }
                else
                {
                    XtraMessageBox.Show(string.Format("抱歉,导入失败,操作出现意外错误!\n信息:{0}", GpTool.ErrorMessage));
                }
            }
        }
Ejemplo n.º 2
0
        public override void OnClick()
        {
            FrmRasteExportr frmRasterExport = new FrmRasteExportr();

            frmRasterExport.RasterName = m_HookHelper.CurrentCatalogItem.DatasetName.Name;
            if (frmRasterExport.ShowDialog() == DialogResult.OK)
            {
                bool isSucceed = GpTool.CopyRaster(m_HookHelper.CurrentCatalogItem.GetGpString(),
                                                   Utility.WorkspaceHelper.GetGpString(frmRasterExport.Workspace, frmRasterExport.RasterCatalogName, null),
                                                   frmRasterExport.WorkspaceType == enumWorkspaceType.File,
                                                   frmRasterExport.RasterFormat);

                if (isSucceed)
                {
                    XtraMessageBox.Show("导出成功!");
                }
                else
                {
                    XtraMessageBox.Show(string.Format("抱歉,导出失败,操作出现意外错误!\n信息:{0}", GpTool.ErrorMessage));
                }
            }
        }