public override void Run() { TreeNode schemaNode = Workbench.Instance.ObjectExplorer.GetSelectedNode(); if (schemaNode.Level == 2 && MessageService.AskQuestion("Are you sure you want to delete this schema?")) { FdoConnectionManager mgr = ServiceManager.Instance.GetService <FdoConnectionManager>(); FdoConnection conn = mgr.GetConnection(schemaNode.Parent.Name); using (FdoFeatureService service = conn.CreateFeatureService()) { try { service.DestroySchema(schemaNode.Name); Msg.ShowMessage(Res.GetString("MSG_SCHEMA_DELETED"), Res.GetString("TITLE_DELETE_SCHEMA")); Log.InfoFormatted(Res.GetString("LOG_SCHEMA_DELETED"), schemaNode.Name, schemaNode.Parent.Name); mgr.RefreshConnection(schemaNode.Parent.Name); } catch (OSGeo.FDO.Common.Exception ex) { Msg.ShowError(ex); } } } }