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