Ejemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();
            menuStrip1.ImageScalingSize = new Size(16, 16);

            arduino = new Arduino();
            arduino.addMenu(connectionToolStripMenuItem);
            arduino.addStatusStrip(sslConnection, sslMessage);
            arduino.addReceivedRichText(richTextBox1, this);

            html = new Html();
            html.addMenu(htmlToolStripMenuItem);
            html.addStatusStrip(sslMessage);

            robot = new Robot();

            robotArduino    = new RobotArduino(arduino, robot);
            reportDirection = new ReportDirection(label1, robot);
            robotHTML       = new RobotHTML(html, robot);

            keypress = new KeyPress(this, robot);

            buttons = new Buttons(robot, btnFwd, btnBack, btnLeft, btnRight);
            buttons.addSensor(btnSensor);
            buttons.addSend(btnSend, txtBoxInstructions);
            buttons.addFollow(btnFollow, btnCallibrate);

            gamepad = new GamepadInterface(robot);
            gamepad.addMenu(gamepadToolStripMenuItem);
            gamepad.addStatusStrip(SSLgp1, SSLgp2, SSLgp3, SSLgp4);
        }
Ejemplo n.º 2
0
 public ControlInterface(int playerNumber)
 {
     gamepadInterface = new GamepadInterface (playerNumber);
     keyboardInterface = new KeyboardInterface (playerNumber);
 }