public static void DoModificationWithSelectionTracking(SpriteMapModifications.ISpriteMapModification mod, ListBox listBox) { mod.SetPreChangeSelection(GetSelectionList(listBox)); mod.Do(); mod.SetPostChangeSelection(GetSelectionList(listBox)); Console.WriteLine("Perform: " + mod); }
public static void RedoAndRestoreSelection(SpriteMapModifications.ISpriteMapModification mod, ListBox listBox) { mod.Do(); SelectFromList(listBox, mod.GetPostChangeSelection()); Console.WriteLine("Redo: " + mod); }