protected override bool DoExecute() { _oldCells = Canvas.Cells.Where(c => c.Brush.Shape != ' ').ToArray(); Unnotate(_oldCells); _newCells = GetAnnotations(); Canvas.Annotate(_newCells); return(!_oldCells.SequenceEqual(_newCells)); }
private bool Reannotate(Cell[] from, Cell[] to) { if (from.SequenceEqual(to)) { return(false); } Unnotate(from); Canvas.Annotate(to); return(true); }
private void Unnotate(IEnumerable <Cell> cells) { Canvas.Annotate(cells.Select(c => c.Clone(' ')).ToArray()); }