Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,035 members, 7,953,107 topics. Date: Thursday, 19 September 2024 at 10:52 AM

Secondary Thread - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Secondary Thread (1028 Views)

Complete Primary And Secondary Website Needed / ICT Training Manual For Primary School And Secondary Schools (2) (3) (4)

(1) (Reply)

Secondary Thread by omosis2: 8:19am On May 19, 2016
What should I do for my wpf grid to receive and handle data although notifications arrive from a secondary thread.
Re: Secondary Thread by Lifeguru02: 7:55pm On May 19, 2016
omosis2:
What should I do for my wpf grid to receive and handle data although notifications arrive from a secondary thread.

you asked a beautiful question I am quite comfortable with. Anyway I use Dapfor grid running my program. This c# code will help you base on your question.

C#

System.Threading.Timer timer = new System.Threading.Timer(state =>
{
Order order = _orders[random.Next(_orders.Count)];
order.Price = random.Next(50, 200) + random.NextDouble();
}, null, 0, 500);
Re: Secondary Thread by solomon201(m): 12:48pm On May 21, 2016
I will suggest you avoid using threads directly. Look into the TPL. How is your data coming? Using signalr? Dispatcher. Invoke should come in handy.

(1) (Reply)

Any Web Dev's In OTA? / Startup Advice - Number 43 I Concur / Are You Interested In A Node Web UI Project?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.