All graph states operations are performed through GraphArea property
StateStorage. Following methods are exposed for the end user:
public bool ContainsState(string id) - returns true if state with specified ID exists within states collection.
public GraphState<TVertex, TEdge, TGraph> GetState(string id) - get graph state by specified id. Null value will be returned if no state with such id exists.
public Dictionary<string, GraphState<TVertex, TEdge, TGraph>> GetStates() - get the list of all available states.
public void LoadState(string id) - load and display graph state by specified id. Note that
GraphArea.Graph, GraphArea.VertexList, GraphArea.EdgesList properties will be overwritten.
public void RemoveState(string id) - remove state by specified id.
public void SaveState(string id, string description = "") - save current graph state using specified id and optional state description.
When graph state is saved then following actions are performed:
1. GraphArea.Graph property are copied.
2. Vertex positions are copied.
3. All visible edges data with route points are copied.
Note that algorithms and animations are NOT currently being saved into the states.
When graph state is loaded thwn following actions are performed:
1. All vertex and edge visual controls are deleted.
2. *GraphArea.Graph property loaded from state.
3. All visual vertices are loaded and saved positions are applied.
4. All visual edges are loaded.