public override void Undo(DrawArea drawArea) { // Add all objects from clone list to list - // opposite to DeleteAll foreach (DrawObject o in cloneList) { drawArea.Add(o); } }
public override void Undo(DrawArea drawArea) { drawArea.UnselectAll(); // Add all objects from cloneList to list. foreach (DrawObject o in cloneList) { drawArea.Add(o); } }
/// <summary> /// Add new object to draw area. /// Function is called when user left-clicks draw area, /// and one of ToolObject-derived tools is active. /// </summary> /// <param name="drawArea"></param> /// <param name="o"></param> protected void AddNewObject(DrawArea drawArea, DrawObject o) { drawArea.UnselectAll(); o.Selected = true; drawArea.Add(o); drawArea.Capture = true; drawArea.Refresh(); drawArea.SetDirty(); }
public override void Redo(DrawArea drawArea) { drawArea.UnselectAll(); drawArea.Add(drawObject); }