Exemple #1
0
 void Data_DataRowChanged(object sender, DataRowChangedEventArgs e)
 {
     if (DataRowChanged != null)
     {
         DataRowChanged(sender, e);
     }
 }
Exemple #2
0
 void portSniffer_DataRowChanged(object sender, Sniffer.DataRowChangedEventArgs e)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new EventHandler <Sniffer.DataRowChangedEventArgs>(portSniffer_DataRowChanged), sender, e);
     }
     else
     {
         if (e.IsNew)
         {
             listBoxData.Items.Add(e.Row);
         }
         else
         {
             listBoxData.Items[e.Index] = e.Row;
         }
         listBoxData.SelectedIndex = listBoxData.Items.Count - 1;
     }
 }