private void DataGridViewRowDataPushQueue(string msgIdStr, string dataLenStr, string dataStr, string typeStr, string timeStampStr) { DiagDataGridViewRowData RowData = new DiagDataGridViewRowData(); RowData.type = typeStr; RowData.id = msgIdStr; RowData.len = dataLenStr; RowData.data = dataStr; RowData.ts = timeStampStr; if (!DiagDataGridViewRowDataQueue.FullFlag) { DiagDataGridViewRowDataQueue.PushQueue(RowData); } }
private void UpdateMainWindowUI() { if (!DiagDataGridViewRowDataQueue.EmptyFlag) { //DiagDataGridViewRowData RowData = new DiagDataGridViewRowData(); object RowDataObject = new object(); DiagDataGridViewRowDataQueue.PopQueue(ref RowDataObject); DiagDataGridViewRowData RowData = RowDataObject as DiagDataGridViewRowData; /* Regardless of Tx or Rx, clear RxDataTextBox. */ UpdateRxDataTextBoxText(""); /* if Recieve Msg, update RxDataTextBox. */ if (RowData.type == "Rx") { UpdateRxDataTextBoxText(RowData.data); } UpdateTxRxMsgUpdateDiagDataGridView(RowData.type, RowData.id, RowData.len, RowData.data, RowData.ts); } }