public void RemoveEmblem(IconEmblem emblem) { if (Emblems.Contains(emblem)) { emblem.Changed -= HandleEmblemChanged; Emblems.Remove(emblem); emblem.Dispose(); QueueRedraw(); } }
public void AddEmblem(IconEmblem emblem) { // remove current emblems at this position foreach (IconEmblem e in Emblems.Where(e => e.Position == emblem.Position).ToList()) { RemoveEmblem(e); } // add the new emblem Emblems.Add(emblem); emblem.Changed += HandleEmblemChanged; QueueRedraw(); }
public void AddEmblem (IconEmblem emblem) { // remove current emblems at this position foreach (IconEmblem e in Emblems.Where (e => e.Position == emblem.Position).ToList ()) RemoveEmblem (e); // add the new emblem Emblems.Add (emblem); emblem.Changed += HandleEmblemChanged; QueueRedraw (); }
public void RemoveEmblem (IconEmblem emblem) { if (Emblems.Contains (emblem)) { emblem.Changed -= HandleEmblemChanged; Emblems.Remove (emblem); emblem.Dispose (); QueueRedraw (); } }