예제 #1
0
 public ControllerForm()
 {
     InitializeComponent();
     this.robotController = new Controller();
     carCommandRepeater = new Timer();
     carCommandRepeater.Enabled = false;
     carCommandRepeater.Interval = 250;
     carCommandRepeater.Tick +=new EventHandler(carCommandRepeater_Tick);
     isConnected = false;
     initializeControlPanel();
     animateConnectionOnce = false;
     isRecording = false;
     initializeAnimationTimers();
 }
예제 #2
0
 //---------------------
 // Robot connect
 //---------------------
 private void btn_connect_Click(object sender, EventArgs e)
 {
     try
     {
         c = new Controller(this);
         Log("Controller connected");
         btn_stop.Enabled = true;
         robot_connected = true;
     }
     catch (System.IO.IOException)
     {
         Log("Error connecting to controller");
     }
 }