public override List <IWorkspaceContribution> GetContributions() { List <IWorkspaceContribution> contrib = new List <IWorkspaceContribution>(); contrib.Add(new MenuWorkspaceContribution(this, "ShowGazetteer", (obj, e) => { ShowEGaz(); }, String.Format("{{'Name':'View', 'Header':'{0}','InsertAfter':'File'}}", _R("Gazetteer.Menu.View")), String.Format("{{'Name':'ShowGazetteer', 'Header':'{0}'}}", _R("Gazetteer.Menu.ShowExplorer")) )); contrib.Add(new MenuWorkspaceContribution(this, "ShowEGazConverter", (obj, e) => { ShowEGazConverter(); }, String.Format("{{'Name':'Tools', 'Header':'_Tools','InsertAfter':'File'}}"), String.Format("{{'Name':'eGaz', 'Header':'eGaz'}}"), String.Format("{{'Name':'ShowEGazConverter', 'Header':'Legacy eGaz file converter'}}") )); contrib.Add(new MenuWorkspaceContribution(this, "ShowFindNearestPlace", (obj, e) => { ShowNearestNamedPlace(); }, String.Format("{{'Name':'Tools', 'Header':'_Tools','InsertAfter':'File'}}"), String.Format("{{'Name':'eGaz', 'Header':'eGaz'}}"), String.Format("{{'Name':'ShowFindNearestPlace', 'Header':'_Find nearest named place'}}") )); contrib.Add(new MenuWorkspaceContribution(this, "ShowCoordCalculator", (obj, e) => { ShowCoordCalculator(); }, String.Format("{{'Name':'Tools', 'Header':'_Tools','InsertAfter':'File'}}"), String.Format("{{'Name':'eGaz', 'Header':'eGaz'}}"), String.Format("{{'Name':'ShowCoordCalculator', 'Header':'_Coordinate calculator'}}") )); _gazetteer = new Gazetteer(this); if (!Preferences.UseFloatingEGaz.Value) { _gazetteerContrib = new ExplorerWorkspaceContribution <Gazetteer>(this, "Gazetteer", _gazetteer, _R("Gazetteer.Title"), (explorer) => { }); contrib.Add(_gazetteerContrib); } return(contrib); }
public override List <IWorkspaceContribution> GetContributions() { var contrib = new List <IWorkspaceContribution> { new MenuWorkspaceContribution(this, "ShowExplorer", (obj, e) => PluginManager.EnsureVisible(this, "TaxonExplorer"), String.Format("{{'Name':'View', 'Header':'{0}','InsertAfter':'File'}}", _R("Taxa.Menu.View")), String.Format("{{'Name':'ShowTaxaExplorer', 'Header':'{0}'}}", _R("Taxa.Menu.ShowExplorer")) ), new MenuWorkspaceContribution(this, "ShowDistributionRegionExplorer", (obj, e) => ShowRegionExplorer(), String.Format("{{'Name':'View', 'Header':'{0}','InsertAfter':'File'}}", _R("Taxa.Menu.View")), String.Format("{{'Name':'ShowDistributionRegionExplorer', 'Header':'Show Distribution Region Explorer'}}") ), new MenuWorkspaceContribution(this, "ShowXMLImport", (obj, e) => ShowXMLImport(), "{'Name':'Tools', 'Header':'Tools','InsertAfter':'View'}", "{'Name':'Import', 'Header':'Import'}", "{'Name':'ShowXMLImport', 'Header':'XML Import'}") }; _explorer = new ExplorerWorkspaceContribution <TaxonExplorer>(this, "TaxonExplorer", new TaxonExplorer(this), _R("TaxonExplorer.Title"), explorer => explorer.InitialiseTaxonExplorer()); contrib.Add(_explorer); return(contrib); }