public Robot() { World.Robot = this; Drive = new Drive.Drive(); RobotConsole = new RobotConsole(); Radar = new Radar.Radar(); Movement = new Movement(); Color = Color.Red; }
private void Dispose(bool disposing) { if (_isDisposed == false) { if (disposing) { Drive.Dispose(); RobotConsole.Dispose(); } } }
public Form1() { InitializeComponent(); _robotConsole = new RobotConsole(); _robotConsole[Switches.Switch1].SwitchStateChanged += SwitchStateChanged; _robotConsole[Switches.Switch2].SwitchStateChanged += SwitchStateChanged; _robotConsole[Switches.Switch3].SwitchStateChanged += SwitchStateChanged; _robotConsole[Switches.Switch4].SwitchStateChanged += SwitchStateChanged; consoleView1.RobotConsole = _robotConsole; }