Пример #1
0
        private void spCard_Error(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
        {
            var msg = "读卡失败!请重试。";

            this.ShowMessageInfo(msg, this.redBrush);
            Log.WriteLog("ERROR-STR:" + msg);
        }
Пример #2
0
        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);
        }
Пример #3
0
        private void SpCabinet_Error(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
        {
            var msg = "智能锁通信失败!请重试。";

            this.ShowMessageInfo(msg, this.redBrush);
            Log.WriteLog("ERROR-RET:" + msg);
        }
Пример #4
0
 private void Sp_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     if (this.ErrorReceived != null)
     {
         this.ErrorReceived(this, e.EventType.ToString());
     }
 }
Пример #5
0
 private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     try
     {
         textBox1.AppendText(e.ToString());
     }
     catch (Exception ex)
     {
         textBox1.AppendText(ex.Message);
     }
 }
Пример #6
0
        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");
            //});
        }
Пример #7
0
        //=========================================================================

        //=========================================================================
        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[] { });
            }
        }
Пример #8
0
        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));
            }
        }
Пример #9
0
 void PortHelp_Error(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
 }
Пример #10
0
 private void serialArduino_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     MessageBox.Show(e.ToString(), "Mensaje de error", MessageBoxButtons.OK, MessageBoxIcon.Error);
 }
Пример #11
0
 private void SerialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     toolStripStatusLabel2.Text = "Recieve Error";
 }
Пример #12
0
 void port_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     throw new NotImplementedException();
 }
Пример #13
0
 private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     this.debug_text.AppendTextError("ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n");
 }
Пример #14
0
 private void Port_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     Core.Main.GetService <IMainLogger>().Logger.RootLogger.LogError(this.GetType().Name, e.EventType.ToString());
 }
Пример #15
0
 private void serialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     // no error handling yet!
 }
Пример #16
0
 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");
 }
Пример #18
0
 public virtual void SerialConnection_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
 }
Пример #19
0
 private void serialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     MessageBox.Show(e.ToString());
 }
Пример #20
0
 private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     Console.WriteLine("Fallo al recibir");
 }
Пример #21
0
 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
 }
Пример #22
0
 private static void SerialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     Console.WriteLine($"Error received");
 }
Пример #23
0
 private void DollSerialPort_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     dollSerialPort.Close();
     MessageBox.Show("通信エラーが発生しました");
 }
Пример #24
0
 /// <summary>
 /// Ошибка на линии
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
 }
Пример #25
0
 private void Serial_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) => serialError(e);
Пример #26
0
 private void SerialPort_ErrorReceived(System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
 }
Пример #27
0
 private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     ShowErrorMessage("RFID串口获取数据出错", "serialPort1_ErrorReceived");
 }
Пример #28
0
 private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     serialPort1.Close();
 }
Пример #29
0
 private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e)
 {
     dataIn.BeginInvoke(new Action(() => { spLabel.Text = "ERROR: " + e.ToString(); }));
 }