private void OpenPort_Click(object sender, RoutedEventArgs e)
 {
     if ((string)OpenPort.Content != "Open Port")
     {
         OpenPort.Content = "Open Port";
         SerialPort.ClosePort();
         AvailableCOM.IsEnabled = true;
     }
     else
     {
         OpenPort.Content = "Close Port";
         SerialPort.OpenPort(AvailableCOM.SelectedValue.ToString());
         AvailableCOM.IsEnabled = false;
     }
 }