Click here to Skip to main content
15,892,298 members
Home / Discussions / C#
   

C#

 
AnswerRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
Richard MacCutchan29-Jan-21 23:19
mveRichard MacCutchan29-Jan-21 23:19 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
arnold_w30-Jan-21 0:31
arnold_w30-Jan-21 0:31 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
Richard MacCutchan30-Jan-21 0:32
mveRichard MacCutchan30-Jan-21 0:32 
AnswerRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
OriginalGriff29-Jan-21 23:25
mveOriginalGriff29-Jan-21 23:25 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
arnold_w30-Jan-21 1:00
arnold_w30-Jan-21 1:00 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
OriginalGriff30-Jan-21 1:17
mveOriginalGriff30-Jan-21 1:17 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
arnold_w30-Jan-21 1:27
arnold_w30-Jan-21 1:27 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
OriginalGriff30-Jan-21 1:58
mveOriginalGriff30-Jan-21 1:58 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
arnold_w30-Jan-21 2:02
arnold_w30-Jan-21 2:02 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
OriginalGriff30-Jan-21 2:39
mveOriginalGriff30-Jan-21 2:39 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
arnold_w30-Jan-21 2:50
arnold_w30-Jan-21 2:50 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
OriginalGriff30-Jan-21 5:45
mveOriginalGriff30-Jan-21 5:45 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
Gerry Schmitz30-Jan-21 3:04
mveGerry Schmitz30-Jan-21 3:04 
JokeRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
Peter_in_278030-Jan-21 10:39
professionalPeter_in_278030-Jan-21 10:39 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
Gerry Schmitz30-Jan-21 12:29
mveGerry Schmitz30-Jan-21 12:29 
AnswerRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
Ralf Meier29-Jan-21 23:25
mveRalf Meier29-Jan-21 23:25 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
OriginalGriff29-Jan-21 23:57
mveOriginalGriff29-Jan-21 23:57 
GeneralRe: What queuing technique and GUI component should I choose for my multi-comport, receive-only terminal software? Pin
arnold_w30-Jan-21 0:40
arnold_w30-Jan-21 0:40 
AnswerRe: multi-comport receiver Pin
Luc Pattyn31-Jan-21 4:35
sitebuilderLuc Pattyn31-Jan-21 4:35 
Hi,

here are my suggestions:

1.
use a single BackGroundWorker per COM port; use its progress reporting facility to report displayable results.

2.
Use synchronous read operations, thus avoiding the tricky DataReceived event.
If you are lucky and the peripheral reports text messages ending on some specific terminator, use ReadLine(); when necessary, adjust the NewLine property to equal that terminator. If not, just use Read and have the BGW discover the beginning and end of every message.

3.
For the UI use the simplest List oriented Control that satisfies your interactive requirements; a ListView is good, however I prefer a ListBox.

4.
Define a little class holding the raw data of one displayable result. That is one object, no more expensive than the array a ListView would need. Instances of this class, not strings, are to be added to the ListBox Items collection.

5.
Make the ListBox ownerdrawn, giving it a fixed ItemHeight, and an appropriate DrawItem handler that takes care of horizontal positioning, coloring, and whatever fancy styling you may want.


That's it; and it is bound to be simpler than the code you probably are experementing with right now...

Smile | :)
Luc Pattyn [My Articles]
If you can't find it on YouTube try TikTok...

QuestionWrite Async Method Pin
Kevin Marois27-Jan-21 6:37
professionalKevin Marois27-Jan-21 6:37 
AnswerRe: Write Async Method Pin
OriginalGriff27-Jan-21 8:07
mveOriginalGriff27-Jan-21 8:07 
GeneralRe: Write Async Method Pin
Kevin Marois27-Jan-21 8:37
professionalKevin Marois27-Jan-21 8:37 
GeneralRe: Write Async Method Pin
Victor Nijegorodov27-Jan-21 11:16
Victor Nijegorodov27-Jan-21 11:16 
GeneralRe: Write Async Method Pin
Pete O'Hanlon27-Jan-21 21:28
mvePete O'Hanlon27-Jan-21 21:28 
GeneralRe: Write Async Method Pin
Victor Nijegorodov27-Jan-21 22:35
Victor Nijegorodov27-Jan-21 22:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.