/// <summary> /// This function is the callback used to execute the command when the menu item is clicked. /// See the constructor to see how the menu item is associated with this function using /// OleMenuCommandService service and MenuCommand class. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Event args.</param> private void MenuItemCallback(object sender, EventArgs e) { var generationServices = RamlReferenceServiceBase.GetRamlReferenceService(Microsoft.VisualStudio.Shell.ServiceProvider.GlobalProvider, new ActivityLogger()); var ramlChooserViewModel = new RamlChooserViewModel(); ramlChooserViewModel.Load(this.ServiceProvider, generationServices.AddRamlReference, "Add RAML Reference", false, Settings.Default.RAMLExchangeUrl); dynamic settings = new ExpandoObject(); settings.Height = 475; AmfToolsPackage.WindowManager.ShowDialog(ramlChooserViewModel, null, settings); }
/// <summary> /// This function is the callback used to execute the command when the menu item is clicked. /// See the constructor to see how the menu item is associated with this function using /// OleMenuCommandService service and MenuCommand class. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Event args.</param> private void Execute(object sender, EventArgs e) { ThreadHelper.ThrowIfNotOnUIThread(); var generationServices = RamlReferenceServiceBase.GetRamlReferenceService(Microsoft.VisualStudio.Shell.ServiceProvider.GlobalProvider, new ActivityLogger()); var ramlChooserViewModel = new RamlChooserViewModel(); ramlChooserViewModel.Load(Microsoft.VisualStudio.Shell.ServiceProvider.GlobalProvider, generationServices.AddRamlReference, "Add RAML Reference", false, RAML.Tools.Properties.Settings.Default.RAMLExchangeUrl); dynamic settings = new ExpandoObject(); settings.Height = 475; AMFToolsPackage.WindowManager.ShowDialog(ramlChooserViewModel, null, settings); }