Пример #1
0
        public void setNewChatLine(string loginName, string chatText, ref DateTime date)
        {
            if (chatTextBuffer.Count > 100)
                chatTextBuffer.RemoveRange(0, 50);

            bufferTextList newline = new bufferTextList() { Content = chatText, LoginName = loginName, DateIn = DateTime.Now };

            chatTextBuffer.Add(newline);
            date = newline.DateIn;

            return;
        }
Пример #2
0
        private void serialData_NewarduinoDataReceived(object sender, EventArgs e)
        {
            string newdata = (string)sender;//arduinoBoardInterface.getSerialDataBuffer();

            if (arduinoSerialDataBuffer.Count > 200)
                arduinoSerialDataBuffer.RemoveRange(0, 100);

            bufferTextList newline = new bufferTextList() { Content = newdata, LoginName = "Arduino", DateIn = DateTime.Now, Permission = "Arduino" };

            arduinoSerialDataBuffer.Add(newline);

            SerialDataLog("Arduino", newdata);
        }