public MultiUpdateDetailsForm(Updater updater, AppInfo appInfo, UpdateHost hostURL, double[] targetVersions) { this.updater = updater; this.appInfo = appInfo; this.hostURL = hostURL; this.targetVersions = targetVersions; updateInfos = new UpdateInfo[targetVersions.Length]; InitializeComponent(); this.Text = LauncherLocale.Current.Get("Updater.Multi.Title"); infoLabel.Text = LauncherLocale.Current.Get("Updater.Multi.InfoLabel"); updateNotesDropdownLabel.Text = LauncherLocale.Current.Get("Updater.Multi.NotesDropDownLabel"); updateNotesComboBox.Items.AddRange(targetVersions.ToList().ConvertAll <string>(d => VersionFormatter.ToString(d)).ToArray()); detailsTextBox.Text = LauncherLocale.Current.Get("Updater.Multi.NotesPlaceholder"); cancelButton.Text = LauncherLocale.Current.Get("Updater.Multi.CancelButton"); updateButton.Text = LauncherLocale.Current.Get("Updater.Multi.ApplyButton").Replace("${updateCount}", targetVersions.Length.ToString()); }
public Uri GetVersionFolderURL(AppInfo appInfo, double version) { UriBuilder uriBuilder = new UriBuilder(hostURL); uriBuilder.Path = uriBuilder.Path + '/' + appInfo.downloadBaseDir + '/' + VersionFormatter.ToString(version) + '/'; return(uriBuilder.Uri); }
private void SetUpdateInfo(UpdateInfo info) { this.updateInfo = info; this.detailsTextBox.Text = info.changeLog; this.infoLabel.Text = LauncherLocale.Current.Get("Updater.Single.InfoLabel"); this.infoLabel.Text = this.infoLabel.Text.Replace("${updateVersion}", VersionFormatter.ToString(info.version)); }