public void Remove(DrawObject obj) { if (ehObjectChanged != null) { ehObjectChanged(obj, OBJ_OPERATE.remove); } obj.Clear(); graphicsList.Remove(obj); }
/// <summary> /// Remove object by index. /// Used for Undo. /// </summary> public void RemoveAt(int index) { DrawObject o = graphicsList[index]; o.Clear(); if (ehObjectChanged != null) { ehObjectChanged(o, OBJ_OPERATE.remove); } graphicsList.RemoveAt(index); }