private void spCard_Error(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { var msg = "读卡失败!请重试。"; this.ShowMessageInfo(msg, this.redBrush); Log.WriteLog("ERROR-STR:" + msg); }
private void m_port_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { string error = string.Empty; switch (e.EventType) { case System.IO.Ports.SerialError.Frame: error = "Framing Error"; break; case System.IO.Ports.SerialError.Overrun: error = "Character Buffer Overrun"; break; case System.IO.Ports.SerialError.RXOver: error = "Receive Buffer Overflow"; break; case System.IO.Ports.SerialError.RXParity: error = "Parity Error"; break; case System.IO.Ports.SerialError.TXFull: error = "Transmit Buffer Overflow"; break; default: error = "Unknown Error"; break; } this.SignalError(error); }
private void SpCabinet_Error(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { var msg = "智能锁通信失败!请重试。"; this.ShowMessageInfo(msg, this.redBrush); Log.WriteLog("ERROR-RET:" + msg); }
private void Sp_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { if (this.ErrorReceived != null) { this.ErrorReceived(this, e.EventType.ToString()); } }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { try { textBox1.AppendText(e.ToString()); } catch (Exception ex) { textBox1.AppendText(ex.Message); } }
private void serialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { //textBoxLOG.BeginInvoke((MethodInvoker)delegate //{ // serialPortClose(); // buttonCONNECT.Text = "Connect"; // MessageBox.Show("COM communication error", "Error"); //}); }
//========================================================================= //========================================================================= protected void _robot_SerialErrorReceieved(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { //---- use lamda to define a method that sets the text Action showError = () => { this.UpdatePortStatus(false); MessageBoxResult result = Sicily.Robotix.MicroController.CommunicationApplication.Dialogs.MessageBox.Show(Window.GetWindow(this), "serial error has occured", "Serial Error", MessageBoxButton.OK); this._showingError = false; }; //---- if the error isn't up already if (!this._showingError) { //---- this._showingError = true; //---- close the port this._robot.Port.Close(); //---- if we're on a different thread, invoke the method on the original thread Dispatcher.BeginInvoke(showError, new object[] { }); } }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { try { serialPort1.Close(); if (serialPort1.IsOpen) { progressBar1.Value = 0; toolStripStatusLabel1.Text = string.Format("COM{0} failed to close", textBoxSerialPort.Text); } if (!serialPort1.IsOpen) { progressBar1.Value = 100; toolStripStatusLabel1.Text = string.Format("COM{0} has close", textBoxSerialPort.Text); } } catch (Exception) { MessageBox.Show(String.Format("COM{0} failed to close", textBoxSerialPort.Text)); } }
void PortHelp_Error(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { }
private void serialArduino_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { MessageBox.Show(e.ToString(), "Mensaje de error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
private void SerialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { toolStripStatusLabel2.Text = "Recieve Error"; }
void port_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { throw new NotImplementedException(); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { this.debug_text.AppendTextError("ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n"); }
private void Port_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { Core.Main.GetService <IMainLogger>().Logger.RootLogger.LogError(this.GetType().Name, e.EventType.ToString()); }
private void serialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { // no error handling yet! }
private void connection_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { dataErrors++; amountErrorsBox.Text = dataErrors.ToString(); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { //MessageBox.Show("Error"); }
public virtual void SerialConnection_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { }
private void serialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { MessageBox.Show(e.ToString()); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { Console.WriteLine("Fallo al recibir"); }
private void Serial_Uchwyt_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { Port_Rozlacz(); MetroMessageBox.Show(this, "Wystąpił błąd połączenia szeregowego.", "Problem", MessageBoxButtons.OK, MessageBoxIcon.Warning); //do sprawdzenia, czy działa podczas odpięcia portu USB }
private static void SerialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { Console.WriteLine($"Error received"); }
private void DollSerialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { dollSerialPort.Close(); MessageBox.Show("通信エラーが発生しました"); }
/// <summary> /// Ошибка на линии /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { }
private void Serial_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) => serialError(e);
private void SerialPort_ErrorReceived(System.IO.Ports.SerialErrorReceivedEventArgs e) { }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { ShowErrorMessage("RFID串口获取数据出错", "serialPort1_ErrorReceived"); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { serialPort1.Close(); }
private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) { dataIn.BeginInvoke(new Action(() => { spLabel.Text = "ERROR: " + e.ToString(); })); }