Ejemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();

            this.robot = new Robot();
            this.drive = robot.Drive;

            this.commonRunParameters1.SpeedChanged        += CommonRunParameters1_SpeedChanged;
            this.commonRunParameters1.AccelerationChanged += CommonRunParameters1_AccelerationChanged;
            this.drive.Power          = true;
            this.driveView1.Drive     = drive;
            this.runLine1.Drive       = drive;
            this.runArc1.Drive        = drive;
            this.runTurn1.Drive       = drive;
            this.radarView1.Radar     = robot.radar;
            this.robotConsole         = new RobotConsole();
            consoleView1.RobotConsole = this.robotConsole;

            robotConsole[Switches.Switch1].SwitchStateChanged += switchStateChanged;
            robotConsole[Switches.Switch2].SwitchStateChanged += switchStateChanged;
            robotConsole[Switches.Switch3].SwitchStateChanged += switchStateChanged;
            robotConsole[Switches.Switch4].SwitchStateChanged += switchStateChanged;

            CommonRunParameters1_AccelerationChanged(null, EventArgs.Empty);
            CommonRunParameters1_SpeedChanged(null, EventArgs.Empty);
        }
Ejemplo n.º 2
0
 public Form1()
 {
     InitializeComponent();
     robotConsole             = new RobotConsole();
     consoleView.RobotConosle = robotConsole;
     (robotConsole[Switches.Switch1]).SwitchStateChanged += (o, e) => (robotConsole[Leds.Led1]).LedEnabled = (robotConsole[Switches.Switch1]).SwitchEnabled;
     (robotConsole[Switches.Switch2]).SwitchStateChanged += (o, e) => (robotConsole[Leds.Led2]).LedEnabled = (robotConsole[Switches.Switch2]).SwitchEnabled;
     (robotConsole[Switches.Switch3]).SwitchStateChanged += (o, e) => (robotConsole[Leds.Led3]).LedEnabled = (robotConsole[Switches.Switch3]).SwitchEnabled;
     (robotConsole[Switches.Switch4]).SwitchStateChanged += (o, e) => (robotConsole[Leds.Led4]).LedEnabled = (robotConsole[Switches.Switch4]).SwitchEnabled;
 }
Ejemplo n.º 3
0
        public Form1()
        {
            InitializeComponent();
            rc = new RobotConsole();
            console.Console = rc;

            rc[Switches.Switch1].SwitchStateChanged += (s, e) => { rc[Leds.Led1].LedEnabled = rc[Switches.Switch1].SwitchEnabled; };
            rc[Switches.Switch2].SwitchStateChanged += (s, e) => { rc[Leds.Led2].LedEnabled = rc[Switches.Switch2].SwitchEnabled; };
            rc[Switches.Switch3].SwitchStateChanged += (s, e) => { rc[Leds.Led3].LedEnabled = rc[Switches.Switch3].SwitchEnabled; };
            rc[Switches.Switch4].SwitchStateChanged += (s, e) => { rc[Leds.Led4].LedEnabled = rc[Switches.Switch4].SwitchEnabled; };
        }
Ejemplo n.º 4
0
        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;
        }
Ejemplo n.º 5
0
        public Form1()
        {
            InitializeComponent();

            rc = new RobotConsole();
            consoleView1.RobotConsole = rc;
            consoleView2.RobotConsole = rc;
            rc[Switches.Switch1].SwitchStateChanged += SwitchStateChanged;
            rc[Switches.Switch2].SwitchStateChanged += SwitchStateChanged;
            rc[Switches.Switch3].SwitchStateChanged += SwitchStateChanged;
            rc[Switches.Switch4].SwitchStateChanged += SwitchStateChanged;
        }
Ejemplo n.º 6
0
        public Form1()
        {
            InitializeComponent();

            this.robotConsole         = new RobotConsole();
            consoleView1.RobotConsole = this.robotConsole;

            robotConsole[Switches.Switch1].SwitchStateChanged += switchStateChanged;
            robotConsole[Switches.Switch2].SwitchStateChanged += switchStateChanged;
            robotConsole[Switches.Switch3].SwitchStateChanged += switchStateChanged;
            robotConsole[Switches.Switch4].SwitchStateChanged += switchStateChanged;
        }
Ejemplo n.º 7
0
        public Form1()
        {
            InitializeComponent();

            rc = new RobotConsole();            //neue RobotConsole erstellen
            consoleView1.RobotConsole = rc;     //Robot Console der consoleView zuweisen über RobotConsole Property
            //Abonnieren der Switch Changed Events über die RobotConsole
            rc[Switches.Switch1].SwitchStateChanged += Switch1StateChanged;
            rc[Switches.Switch2].SwitchStateChanged += Switch2StateChanged;
            rc[Switches.Switch3].SwitchStateChanged += Switch3StateChanged;
            rc[Switches.Switch4].SwitchStateChanged += Switch4StateChanged;
        }
Ejemplo n.º 8
0
 public Form1()
 {
     InitializeComponent();
     rc = new RobotConsole();
     consoleView1.RobotConsole = rc;
     for (int j = 0; j <= 3; j++)
     {
         (rc[Switches.Switch1]).SwitchStateChanged += (o, e) => (rc[Leds.Led1]).LedEnabled = (rc[Switches.Switch1]).SwitchEnabled;
         (rc[Switches.Switch2]).SwitchStateChanged += (o, e) => (rc[Leds.Led2]).LedEnabled = (rc[Switches.Switch2]).SwitchEnabled;
         (rc[Switches.Switch3]).SwitchStateChanged += (o, e) => (rc[Leds.Led3]).LedEnabled = (rc[Switches.Switch3]).SwitchEnabled;
         (rc[Switches.Switch4]).SwitchStateChanged += (o, e) => (rc[Leds.Led4]).LedEnabled = (rc[Switches.Switch4]).SwitchEnabled;
     }
 }