Ejemplo n.º 1
0
 private static void OnDataChange(object sender, PolyDataChangeEventArgs args)
 {
     // A delta is available so wake-up the main thread
     WaitHandle.Set();
 }
Ejemplo n.º 2
0
 // Event handler called whenever a delta is received
 private void OnDataChange(object sender, PolyDataChangeEventArgs args)
 {
     // DataGridView changes must be run on the UI thread
     BeginInvoke((MethodInvoker)delegate
     {
         // Apply the delta to the data table and re-sort it
         dataAdapter.FillDelta(dataTable);
         dataTable.AcceptChanges();
         dataGridView.Sort(dataGridView.Columns["code"], ListSortDirection.Ascending);
         dataGridView.Refresh();
     });
 }