Example #1
0
        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));
                }
            }
        }
Example #2
0
        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);
            }
        }