protected override void Initialize() { base.Initialize(); var repository = (IVsExtensionRepository)GetService(typeof(SVsExtensionRepository)); var manager = (IVsExtensionManager)GetService(typeof(SVsExtensionManager)); var mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService; var outWindow = GetService(typeof(SVsOutputWindow)) as IVsOutputWindow; if (repository == null || manager == null || mcs == null || outWindow == null) { return; } // Get a unique output window pane var paneGuid = new Guid("233a6542-251a-42b1-b435-c80a3d70340e"); outWindow.CreatePane(ref paneGuid, "Extension Updater", 1, 1); IVsOutputWindowPane customOutputPane; outWindow.GetPane(ref paneGuid, out customOutputPane); // Initialize settings Settings.Initialize(this); // Setup the menu buttons Commands commands = new Commands(repository, manager, mcs, customOutputPane); commands.Initialize(); // Check for extension updates Updater updater = new Updater(repository, manager); updater.CheckForUpdates(); }
private void MasterSwitch(object sender, EventArgs e) { OleMenuCommand command = (OleMenuCommand)sender; Settings.Enabled = !command.Checked; if (!command.Checked) // Not checked means that it is checked. { Updater updater = new Updater(_repository, _manager); updater.CheckForUpdates(); } }
protected override void Initialize() { base.Initialize(); var repository = (IVsExtensionRepository)GetService(typeof(SVsExtensionRepository)); var manager = (IVsExtensionManager)GetService(typeof(SVsExtensionManager)); var mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (repository == null || manager == null || mcs == null) return; Settings.Initialize(this); // Setup the menu buttons Commands commands = new Commands(repository, manager, mcs); commands.Initialize(); // Check for extension updates Updater updater = new Updater(repository, manager); updater.CheckForUpdates(); }