using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ScriptToolGui { class MatchedGroupCollection : IEnumerable { public string Name { get; set; } public List Groups { get; private set; } public List Games { get; private set; } public MatchedGroupCollection(string name, params Game[] games) { Name = name; Groups = new List(); Games = new List(games); } public void SortGroups() { Groups.Sort((g1, g2) => g1.Refs[Game.Eb].Index.CompareTo(g2.Refs[Game.Eb].Index)); } public IEnumerator GetEnumerator() { return Groups.GetEnumerator(); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return GetEnumerator(); } public override string ToString() { return Name; } } }