mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
Add statistics to list of rom sets.
This commit is contained in:
@@ -53,15 +53,20 @@ namespace RomRepoMgr.ViewModels
|
||||
RomSets = new ObservableCollection<RomSetModel>(romSets);
|
||||
}
|
||||
|
||||
public ObservableCollection<RomSetModel> RomSets { get; }
|
||||
public string RomSetLabel => "ROM sets";
|
||||
public string RomSetNameLabel => "Name";
|
||||
public string RomSetVersionLabel => "Version";
|
||||
public string RomSetAuthorLabel => "Author";
|
||||
public string RomSetDateLabel => "Date";
|
||||
public string RomSetDescriptionLabel => "Description";
|
||||
public string RomSetCommentLabel => "Comment";
|
||||
public string RomSetHomepageLabel => "Homepage";
|
||||
public ObservableCollection<RomSetModel> RomSets { get; }
|
||||
public string RomSetLabel => "ROM sets";
|
||||
public string RomSetNameLabel => "Name";
|
||||
public string RomSetVersionLabel => "Version";
|
||||
public string RomSetAuthorLabel => "Author";
|
||||
public string RomSetDateLabel => "Date";
|
||||
public string RomSetDescriptionLabel => "Description";
|
||||
public string RomSetCommentLabel => "Comment";
|
||||
public string RomSetTotalMachinesLabel => "Games";
|
||||
public string RomSetCompleteMachinesLabel => "Complete";
|
||||
public string RomSetIncompleteMachinesLabel => "Incomplete";
|
||||
public string RomSetTotalRomsLabel => "ROMs";
|
||||
public string RomSetHaveRomsLabel => "Have";
|
||||
public string RomSetMissRomsLabel => "Miss";
|
||||
|
||||
public string Greeting => "Hello World!";
|
||||
public bool NativeMenuSupported =>
|
||||
|
||||
@@ -370,15 +370,23 @@ namespace RomRepoMgr.ViewModels
|
||||
ThenBy(r => r.Date).ThenBy(r => r.Description).ThenBy(r => r.Comment).
|
||||
ThenBy(r => r.Filename).Select(r => new RomSetModel
|
||||
{
|
||||
Author = r.Author,
|
||||
Comment = r.Comment,
|
||||
Date = r.Date,
|
||||
Description = r.Description,
|
||||
Filename = r.Filename,
|
||||
Homepage = r.Homepage,
|
||||
Name = r.Name,
|
||||
Sha384 = r.Sha384,
|
||||
Version = r.Version
|
||||
Author = r.Author,
|
||||
Comment = r.Comment,
|
||||
Date = r.Date,
|
||||
Description = r.Description,
|
||||
Filename = r.Filename,
|
||||
Homepage = r.Homepage,
|
||||
Name = r.Name,
|
||||
Sha384 = r.Sha384,
|
||||
Version = r.Version,
|
||||
TotalMachines = r.Machines.Count,
|
||||
CompleteMachines =
|
||||
r.Machines.Count(m => m.Files.All(f => f.File.IsInRepo)),
|
||||
IncompleteMachines =
|
||||
r.Machines.Count(m => m.Files.Any(f => !f.File.IsInRepo)),
|
||||
TotalRoms = r.Machines.Sum(m => m.Files.Count),
|
||||
HaveRoms = r.Machines.Sum(m => m.Files.Count(f => f.File.IsInRepo)),
|
||||
MissRoms = r.Machines.Sum(m => m.Files.Count(f => !f.File.IsInRepo))
|
||||
}).ToList()
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user