public override void OnClick() { FrmFeatureClassExport frmFeatureClass = new FrmFeatureClassExport(); if (frmFeatureClass.ShowDialog() == DialogResult.OK) { bool isSucceed = GpTool.CopyFeatureClass(m_HookHelper.CurrentCatalogItem.GetGpString(), WorkspaceHelper.GetGpString(frmFeatureClass.Workspace, frmFeatureClass.FeatureDatasetName, null), frmFeatureClass.FeatureClassName); if (isSucceed) { XtraMessageBox.Show("导出成功!"); } else { XtraMessageBox.Show(string.Format("抱歉,导出失败,操作出现意外错误!\n信息:{0}", GpTool.ErrorMessage)); } } }
private void btnOK_Click(object sender, EventArgs e) { string strErrMsg = null; if (!ValidateSetting(ref strErrMsg)) { XtraMessageBox.Show(strErrMsg); return; } //string strOutput=txtWorkspace.Text; //if (m_SelectedWorkspaceType == enumWorkspaceType.SDE) //{ // strOutput = Utility.SDEHelper.GetGpString(m_Workspace, cmbDataset.Text, txtFeatureClassName.Text); //} //else //{ // if(!string.IsNullOrEmpty(cmbDataset.Text)) // strOutput = string.Format("{0}\\{1}", strOutput, cmbDataset.Text); // strOutput = string.Format("{0}\\{1}", strOutput, txtFeatureClassName.Text); //} //if (!string.IsNullOrEmpty(cmbDataset.Text)) //{ // IFeatureDataset fDsTarget = (m_Workspace as IFeatureWorkspace).OpenFeatureDataset(cmbDataset.Text); // (fDsTarget as ISchemaLock).ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock); //} string strOutput = Utility.WorkspaceHelper.GetGpString(m_Workspace, cmbDataset.Text, txtFeatureClassName.Text); bool isSucceed = GpTool.Import3DFile(txt3DFile.Text, strOutput, m_SpatialReferenceString); if (isSucceed) { XtraMessageBox.Show("导入3D数据成功!"); this.DialogResult = DialogResult.OK; } else { XtraMessageBox.Show("抱歉,导入出现错误!"); } }
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)); } } }
public override void OnClick() { FrmFeatureClassImport frmFeatureClass = new FrmFeatureClassImport(); if (frmFeatureClass.ShowDialog() == DialogResult.OK) { bool isSucceed = GpTool.CopyFeatureClass(WorkspaceHelper.GetGpString(frmFeatureClass.Workspace, frmFeatureClass.FeatureDatasetName, frmFeatureClass.FeatureClassName), m_HookHelper.CurrentCatalogItem.GetGpString(), frmFeatureClass.FeatureClassName.Substring(0, frmFeatureClass.FeatureClassName.LastIndexOf("."))); if (isSucceed) { XtraMessageBox.Show("导入成功!"); } else { XtraMessageBox.Show(string.Format("抱歉,导入失败,操作出现意外错误!\n信息:{0}", GpTool.ErrorMessage)); } m_HookHelper.CurrentCatalogItem.Open(true); } }
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)); } } }