Ejemplo n.º 1
0
 private void OnObjectLockingEvent(object sender, Base.ObjectLockingEventArgs args)
 {
     foreach (var obj in objectsToBeUnlocked)
     {
         if (obj.IsLockedByOtherUser)
         {
             SetInteractivity(false, "Start or end is locked");
             return;
         }
     }
     SetInteractivity(true);
 }
Ejemplo n.º 2
0
 public void Add(ObjectLockingEventArgs objectsLockingEvent)
 {
     if (IsSceneOrProject(objectsLockingEvent.ObjectIds.FirstOrDefault()))   //in the list, there should be always only objects or only projects/scenes, so taking the first id should work
     {
         OnObjectLockingEvent?.Invoke(this, objectsLockingEvent);
     }
     else
     {
         lock (events) {
             events.Add(objectsLockingEvent);
         }
     }
     InvokeEvents();
 }