public static void PublishSite(InstallWizardArgs args) { MainWindowHelper.RefreshInstances(); var instance = InstanceManager.Default.GetInstance(args.InstanceName); new PublishButton().OnClick(MainWindow.Instance, instance); }
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; } } }