18 lines
666 B
C#
18 lines
666 B
C#
using System.ComponentModel;
|
|
|
|
namespace ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
|
|
|
public record ModUpdateInfo(KeyValuePair<string, string>[] AvailableVersions, InstallAction Origin) : INotifyPropertyChanged
|
|
{
|
|
public event PropertyChangedEventHandler? PropertyChanged;
|
|
|
|
public int NewVersion { get; set; }
|
|
public bool Visible { get; set; } = true;
|
|
|
|
public IEnumerable<string> DisplayVersions { get; } = AvailableVersions.Select(n =>
|
|
{
|
|
if (string.IsNullOrWhiteSpace(n.Value) || n.Value.Equals(n.Key, StringComparison.InvariantCulture))
|
|
return n.Key;
|
|
return $"{n.Value} ({n.Value})";
|
|
});
|
|
} |