S
Shark
Hi,
I need a help. My application reads data from COM port, this data is then
parsed and displyed on:
1. two plotters
2. text box.
I'm using Invoke method to update UI when new data is received (through
delegate).
void UpdateUI(IAbstract data)
{
if(data is Result)
// update texbox
else if (data is PlotterResult)
// update two plotter ctrls
}
Every 20 miliseconds I'm receiving data for plotter and every 1 sec data for
textbox.
Unfortunately it doesn't work fine. Data in textbox is not displayed every 1
sec (instead 5,6 sec). I noticed that it's caused by
repainting plotter control because it consume some time.
I tried BeginInvoke instead Invoke but things went even worse.
How to deal with such problem? Maybe I have to create each UI component in
separate thread? (how?).
Thanks for any advise.
Shark
I need a help. My application reads data from COM port, this data is then
parsed and displyed on:
1. two plotters
2. text box.
I'm using Invoke method to update UI when new data is received (through
delegate).
void UpdateUI(IAbstract data)
{
if(data is Result)
// update texbox
else if (data is PlotterResult)
// update two plotter ctrls
}
Every 20 miliseconds I'm receiving data for plotter and every 1 sec data for
textbox.
Unfortunately it doesn't work fine. Data in textbox is not displayed every 1
sec (instead 5,6 sec). I noticed that it's caused by
repainting plotter control because it consume some time.
I tried BeginInvoke instead Invoke but things went even worse.
How to deal with such problem? Maybe I have to create each UI component in
separate thread? (how?).
Thanks for any advise.
Shark