Ejemplo n.º 1
0
        public virtual void SendChar(char c)
        {
            //System.Diagnostics.Debug.WriteLine("SendChar: " + (int) c);
            if (c == (char)8 && BackspaceDeleteMode)
            {
                c = (char)127;
            }

            SendBuffer.Add(c);
            ReadyToSend?.Invoke(this, new EventArgs());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Convert a UTF string to ASCII data and send it to the output port.
 /// </summary>
 /// <param name="Text">Text to transmit</param>
 public virtual void SendString(string Text)
 {
     for (int i = 0; i < Text.Length; i++)
     {
         SendBuffer.Add(Text[i]);
         ReadyToSend?.Invoke(this, new EventArgs());
         while (SendBuffer.Count > 255)
         {
             System.Windows.Forms.Application.DoEvents();
         }
     }
 }
Ejemplo n.º 3
0
        //Moje metody-------------------------------

        public void SetReadyToSend(bool val) //Metoda ustawiająca wartość i kolor czekboksa ReadyToSend
        {
            if (val == false)
            {
                ReadyToSend.Invoke(new Action(() => ReadyToSend.Checked   = false));
                ReadyToSend.Invoke(new Action(() => ReadyToSend.BackColor = Color.Crimson));
            }

            else
            {
                ReadyToSend.Invoke(new Action(() => ReadyToSend.Checked   = true));
                ReadyToSend.Invoke(new Action(() => ReadyToSend.BackColor = Color.SpringGreen));
            }
        }