Beispiel #1
0
 private void UpdateWithLock(AtomEventArgs e)
 {
     lock (_locker)
     {
         _crystal[e.PrevIndex] -= 1;
         _crystal[e.NewIndex]  += 1;
     }
 }
Beispiel #2
0
 private void UpdateCrystalState(object sender, AtomEventArgs e)
 {
     if (_withLock)
     {
         UpdateWithLock(e);
     }
     else
     {
         UpdateWithoudLock(e);
     }
 }