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; }
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; }