private void generateSerialBtn_Click(object sender, EventArgs e) { if (Board == null) { return; } Board.Open(); Board.UpdateSerialNumber(getSerialNumber()); Board.UpdateDeviceName("MyTreehopper"); Board.Reboot(); Board.Close(); }
static void TreehopperUSB_BoardRemoved(TreehopperManager sender, TreehopperUSB board) { Board.Close(); timer.Stop(); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { myBoard.Close(); }