Exemplo n.º 1
0
        private void DisconnectPortClick(object sender, RoutedEventArgs e)
        {
            try
            {
                _connection.ClosePort();
                arduinoActions.StopActions();
            }
            catch (IOException ioException)
            {
                MessageBox.Show(ioException.Message);
            }

            handleStopFetching();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Runs methods before application is completely closed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void RunCloseCheckups(object sender, System.ComponentModel.CancelEventArgs e)
 {
     arduinoActions.StopActions();
     _connection?.ClosePort();
 }