Ejemplo n.º 1
0
 private async void Stop_OnClick(object sender, RoutedEventArgs e)
 {
     await PopupIfThrowsAsync(async() => {
         if (_serial == null)
         {
             throw new InvalidOperationException("Not connected");
         }
         await _serial.SendCommandAsync(BciCommand.Simple(BciCommand.General.STOP_STREAM));
         txtInfo.Text += "Streaming stopped\n";
         DataManager.Current.Stop();
     });
 }
Ejemplo n.º 2
0
 private async void Reset_OnClick(object sender, RoutedEventArgs e)
 {
     await PopupIfThrowsAsync(async() => {
         if (_serial == null)
         {
             throw new InvalidOperationException("Not connected");
         }
         await _serial.SendCommandAsync(BciCommand.Simple(BciCommand.General.RESET));
         txtInfo.Text += "Device reset\n";
         txtInfo.Text  = "";
         DataManager.Current.Stop();
     });
 }