Example #1
0
 public CoordinatesVisualizer(LeapListener leapListener, TextBox coordTextBox, MainWindow mainWindow)
 {
     _leapListener = leapListener;
     _readingThread = new Thread(GetInfoFromLeap);
     _readingThread.Start();
     this.mainWindow = mainWindow;
     this.coordinatesTextBox = coordTextBox;
 }
Example #2
0
 public CoordinatesVisualizer(LeapListener leapListener, TextBox coordTextBox, MainWindow mainWindow)
 {
     _leapListener  = leapListener;
     _readingThread = new Thread(GetInfoFromLeap);
     _readingThread.Start();
     this.mainWindow         = mainWindow;
     this.coordinatesTextBox = coordTextBox;
 }
Example #3
0
        private void Connect_Click(object sender, EventArgs e)
        {
            var device = groupBox1.Controls.OfType<RadioButton>().FirstOrDefault(n => n.Checked);
            leapListener = new LeapListener();

            robotController = new RobotController(leapListener, device != null ? (Device)device.Tag : Device.Platform);
            coordinatesVisualizer = new CoordinatesVisualizer(leapListener, coordinatesTextBox, this);
            ConnectedLabel.Visible = true;
        }
Example #4
0
        private void Connect_Click(object sender, EventArgs e)
        {
            var device = groupBox1.Controls.OfType <RadioButton>().FirstOrDefault(n => n.Checked);

            leapListener = new LeapListener();

            robotController        = new RobotController(leapListener, device != null ? (Device)device.Tag : Device.Platform);
            coordinatesVisualizer  = new CoordinatesVisualizer(leapListener, coordinatesTextBox, this);
            ConnectedLabel.Visible = true;
        }
Example #5
0
        public RobotController(LeapListener leapListener, Device device)
        {
            Console.WriteLine(device.ToString());
            _leapListener = leapListener;

            switch (device)
            {
                case Device.Platform:
                    deviceController = new PlatformController();
                    break;
                case Device.ArmBigger:
                    deviceController = new ArmBiggerController();
                    break;
                case Device.ArmSmaller:
                    deviceController = new ArmSmallerController();
                    break;
            }
            _controlThread = new Thread(controlRobot);
            _controlThread.Start();
        }
Example #6
0
        public RobotController(LeapListener leapListener, Device device)
        {
            Console.WriteLine(device.ToString());
            _leapListener = leapListener;

            switch (device)
            {
            case Device.Platform:
                deviceController = new PlatformController();
                break;

            case Device.ArmBigger:
                deviceController = new ArmBiggerController();
                break;

            case Device.ArmSmaller:
                deviceController = new ArmSmallerController();
                break;
            }
            _controlThread = new Thread(controlRobot);
            _controlThread.Start();
        }