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); } } } }
void ShowException(object sender, EventArgs e) { MessageService.ShowMessage(exceptionGot.ToString(), "Exception got"); }
void ShowException(object sender, EventArgs e) { MessageService.ShowMessage(exceptionGot.ToString(), StringParser.Parse("${res:ICSharpCode.Core.Services.ErrorDialogs.ExceptionGotDescription}")); }