Exemplo n.º 1
0
 //this will run when the user records a new runner time
 public void OnTime()
 {
     //cross threading non-sense
     if (dataGridTiming.InvokeRequired)
     {
         try
         {
             OnTimeCallBack d = new OnTimeCallBack(OnTime);
             this.Invoke(d);
         }
         catch (ObjectDisposedException ode) { }//saw this when app was closed without ending race first
         catch (Exception e) { MessageBox.Show(e.Message); }
     }
     if (!timingCellBeingEdited && !dataGridTiming.InvokeRequired)
     {
         TimingTableLoad();
         HighlightTimingErrors();
         if (dataGridTiming.RowCount > 0)
         {
             dataGridTiming.FirstDisplayedScrollingRowIndex = dataGridTiming.RowCount - 1;
         }
     }
 }
Exemplo n.º 2
0
 //this will run when the user records a new runner time
 public void OnTime()
 {
     //cross threading non-sense
     if (dataGridTiming.InvokeRequired)
     {
         try
         {
             OnTimeCallBack d = new OnTimeCallBack(OnTime);
             this.Invoke(d);
         }
         catch (ObjectDisposedException ode) { }//saw this when app was closed without ending race first
         catch (Exception e) { MessageBox.Show(e.Message); }
     }
     if (!timingCellBeingEdited && !dataGridTiming.InvokeRequired)
     {
         TimingTableLoad();
         HighlightTimingErrors();
         if(dataGridTiming.RowCount>0)
             dataGridTiming.FirstDisplayedScrollingRowIndex = dataGridTiming.RowCount - 1;
     }
 }