Class GraphView
Class for displaying finite-state automata as graphs in a separate window (and its own separate thread).
Inheritance
Implements
Inherited Members
Namespace: Automata.Visualization
Assembly: Automata.Visualization.dll
Syntax
public class GraphView : Form, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Remarks
You do not need to involve any GUI boilerplate code to display a graph in a separate window, like calling the blocking Application.Run()
, setting STA thread environment or bother about the GUI messes with your threads.
Simply just create and open a graph view by calling either OpenNew() or OpenNew(Graph).
This class uses the MSAGL library for layout and rendering of graphs.
Methods
| Edit this page View SourceDispose(bool)
Disposes of the resources (other than memory) used by the Form.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
| Edit this page View SourceInvoke(Action)
Invokes the specified action on the UI thread.
Declaration
public void Invoke(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | Action to invoke. |
OpenNew()
Opens a new instance of the GraphView class in a new thread.
Declaration
public static GraphView OpenNew()
Returns
Type | Description |
---|---|
GraphView | A new instance of the GraphView class. |
OpenNew(Graph)
Opens a new instance of the GraphView class in a new thread and sets the specified graph.
Declaration
public static GraphView OpenNew(Graph graph)
Parameters
Type | Name | Description |
---|---|---|
Graph | graph | Graph to display. |
Returns
Type | Description |
---|---|
GraphView | A new instance of the GraphView class with the specified graph set. |
SetGraph(Graph)
Displays the specified graph in the graph view.
Declaration
public void SetGraph(Graph graph)
Parameters
Type | Name | Description |
---|---|---|
Graph | graph | Graph to display. |