public void OnClick(Window mainWindow, Instance instance) { using (new ProfileSection("Refresh main window instances", this)) { ProfileSection.Argument("mainWindow", mainWindow); ProfileSection.Argument("instance", instance); var refreshMode = this.GetMode(mainWindow); switch (refreshMode) { case RefreshMode.Instances: MainWindowHelper.RefreshInstances(); return; case RefreshMode.Installer: MainWindowHelper.RefreshInstaller(); return; case RefreshMode.Caches: MainWindowHelper.RefreshCaches(); return; case RefreshMode.Everything: MainWindowHelper.RefreshEverything(); return; } } }
public void OnClick(Window mainWindow, Instance instance) { Analytics.TrackEvent("Download"); if (FileSystem.FileSystem.Local.Directory.Exists(ProfileManager.Profile.LocalRepository)) { WizardPipelineManager.Start("download", mainWindow, null, null, ignore => MainWindowHelper.RefreshInstaller(), WindowsSettings.AppDownloaderSdnUserName.Value, WindowsSettings.AppDownloaderSdnPassword.Value); } }