async private void contextItem_ImportFields_Click(object sender, EventArgs e)
        {
            var alterTable = await GetAlterTable();

            if (alterTable == null)
            {
                MessageBox.Show("Change properties is not implemented for this feature...");
                return;
            }

            var tableClass = await _exObject?.GetInstanceAsync() as ITableClass;

            if (tableClass == null)
            {
                return;
            }

            List <ExplorerDialogFilter> filters = new List <ExplorerDialogFilter>();

            filters.Add(new OpenFeatureclassFilter());

            ExplorerDialog dlg = new ExplorerDialog("Open Featureclass", filters, true);

            dlg.MulitSelection = false;

            if (dlg.ShowDialog() == DialogResult.OK &&
                dlg.ExplorerObjects != null &&
                dlg.ExplorerObjects.Count == 1)
            {
                var dlgTableClass = await dlg.ExplorerObjects[0].GetInstanceAsync() as ITableClass;
                if (dlgTableClass != null)
                {
                    ITableClass tcFrom = dlgTableClass;
                    ITableClass tcTo   = tableClass;

                    FormSelectFields selDlg = new FormSelectFields(tcFrom, tcTo);
                    if (selDlg.ShowDialog() == DialogResult.OK)
                    {
                        foreach (IField field in selDlg.SelectedFields)
                        {
                            if (!await alterTable.AlterTable(_exObject.Name, null, new Field(field)))
                            {
                                MessageBox.Show("ERROR :" + ((alterTable is IDatabase) ? ((IDatabase)alterTable).LastErrorMessage : ""));
                                break;
                            }
                        }
                        await this.OnShow();
                    }
                }
            }
        }
        private void contextItem_ImportFields_Click(object sender, EventArgs e)
        {
            if (AlterTable == null)
            {
                MessageBox.Show("Change properties is not implemented for this feature...");
                return;
            }
            if (_exObject == null || !(_exObject.Object is ITableClass))
            {
                return;
            }

            List <ExplorerDialogFilter> filters = new List <ExplorerDialogFilter>();

            filters.Add(new OpenFeatureclassFilter());

            ExplorerDialog dlg = new ExplorerDialog("Open Featureclass", filters, true);

            dlg.MulitSelection = false;

            if (dlg.ShowDialog() == DialogResult.OK &&
                dlg.ExplorerObjects != null &&
                dlg.ExplorerObjects.Count == 1 &&
                dlg.ExplorerObjects[0].Object is ITableClass)
            {
                ITableClass tcFrom = dlg.ExplorerObjects[0].Object as ITableClass;
                ITableClass tcTo   = _exObject.Object as ITableClass;

                FormSelectFields selDlg = new FormSelectFields(tcFrom, tcTo);
                if (selDlg.ShowDialog() == DialogResult.OK)
                {
                    foreach (IField field in selDlg.SelectedFields)
                    {
                        if (!AlterTable.AlterTable(_exObject.Name, null, new Field(field)))
                        {
                            MessageBox.Show("ERROR :" + ((AlterTable is IDatabase) ? ((IDatabase)AlterTable).lastErrorMsg : ""));
                            break;
                        }
                    }
                    this.OnShow();
                }
            }
        }