예제 #1
0
 public void Release(string uid)
 {
     foreach (LockEffect effect in Effects.OfType <LockEffect>().Where(effect => effect.Uid == uid))
     {
         effect.Alive = false;
     }
     if (!(Effects.OfType <LockEffect>().Any()))
     {
         Released.SafeInvoke(null, EventArgs.Empty);
     }
 }
예제 #2
0
 public void Release(bool force)
 {
     //Release all lock effects
     foreach (LockEffect effect in Effects.OfType <LockEffect>())
     {
         if (!force && !String.IsNullOrEmpty(effect.Uid))
         {
             continue;
         }
         effect.Alive = false;
     }
     Released.SafeInvoke(null, EventArgs.Empty);
 }