Home > Net >  C # through a Socket to receive the return of command and display in the DataGridview
C # through a Socket to receive the return of command and display in the DataGridview

Time:09-19

Everyone a great god, who has done the socket to receive the next bit machine back to the command and display in the datagridview, real-time display, lower machine return speed 12 * 1000 bytes per second, I do use threads to receive processing, display process have caton like now,

CodePudding user response:

Send code,
You are through the begininvoke () method to asynchronous update datagridview?

CodePudding user response:

Handled separately, ignore what sokect

First open a thread, send a simulated parsed object per second to BlockingCollection The

Open a thread in the other, using the foreach var. Xx in the BlockingCollection GetConsumingEnumerable () to get the data displayed to DGV

Ps: real-time record in theory, DGV records don't show too much, real-time news reserve half 2000 good, want to see more information in addition to the historical information query UI, from a database query
  •  Tags:  
  • C#
  • Related