/// <summary> /// Return list of graphic objects. /// Used if client program needs to make its own usage of /// graphics objects, like save them in some persistent storage. /// </summary> public PropertiesGraphicsBase[] GetListOfGraphicObjects() { PropertiesGraphicsBase[] result = new PropertiesGraphicsBase[graphicsList.Count]; int i = 0; foreach (GraphicsBase g in graphicsList) { result[i++] = g.CreateSerializedObject(); } return result; }
// Create this command with DrawObject instance added to the list public CommandAdd(GraphicsBase newObject) : base() { // Keep copy of added object this.newObjectClone = newObject.CreateSerializedObject(); }