sort systems by name
This commit is contained in:
parent
0f44a6a9a7
commit
abb7954614
@ -1,11 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using EDPlayerJournal.BGS;
|
||||
|
||||
namespace EliteBGS;
|
||||
|
||||
public class SystemObjectives : INotifyPropertyChanged {
|
||||
public class SystemObjectives : INotifyPropertyChanged, IComparable<SystemObjectives> {
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private bool isenabled = true;
|
||||
@ -23,6 +24,11 @@ public class SystemObjectives : INotifyPropertyChanged {
|
||||
public string SystemName { get; set; } = string.Empty;
|
||||
|
||||
public List<Objective> Objectives { get; set; } = new();
|
||||
|
||||
public int CompareTo(SystemObjectives other) {
|
||||
if (other == null) return 1;
|
||||
return string.Compare(SystemName, other.SystemName, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
public class Report {
|
||||
@ -62,5 +68,7 @@ public class Report {
|
||||
}
|
||||
objective.UITransactions.Add(new UITransaction(t));
|
||||
}
|
||||
|
||||
SystemObjectives.Sort();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user