Click or drag to resize
DistributedAlgorithmSimulator Class
Distributed Algorithm Simulator
Main Windows of the Distributed Algorithm Simulator application.
Inheritance Hierarchy

Namespace: DistributedAlgorithmSimulator
Assembly: DistributedAlgorithmSimulator (in DistributedAlgorithmSimulator.exe) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class DistributedAlgorithmSimulator : Form

The DistributedAlgorithmSimulator type exposes the following members.

Constructors
  NameDescription
Private methodStatic memberDistributedAlgorithmSimulator
Public methodDistributedAlgorithmSimulator
Initializes a new instance of the DistributedAlgorithmSimulator class.
Top
Methods
  NameDescription
Private methodbtnExit_Click
Exits the application.
Private methodbtnOpenFile_Click
Launches a FileOpen dialog which lets the user select the input file.
Private methodbtnRead_Click
Reads the node IDs and creates a list of IDs. Depending on the user's selection, reads either from a user selected file or takes input from a text box.
Private methodbtnRun_Click
Executes the simulation depending on user preference of Visual or Textual simulation. If the number of nodes is greater than 18, prompts the user to launch a Textual Simulation.
Private methodCreateNetwork
Creates a ring network which can pass messages in either clockwise or counter-clockwise directions Nodes are linked to their CW and CCW neighbors using a private id called linkID (which isn't a part of the algorithm)
Private methodInitializations
Performs initializations such as setting initial values of controls.
Private methodInitializeComponent
Required method for Designer support - do not modify the contents of this method with the code editor.
Private methodLaunchSimulation
Launches either a Visual Simulation or a Textual Simulation of an algorithm of user's choice.
Private methodLoadAlgorithms
Loads available algorithms into "Algorithm Type" combo box.
Private methodrbInputIDs_CheckedChanged
Specifies user preference of reading input from a textbox.
Private methodrbReadFromFile_CheckedChanged
Specifies user preference of reading input from a file.
Private methodSimulatorMain_Load
Form load event of the main window.
Top
See Also