Exemplo n.º 1
0
 public FileQueueChangedArgs(FileQueueElement element, FileQueueAction action)
 {
     this.Element = element;
     this.Action = action;
 }
Exemplo n.º 2
0
 public void Push(FileQueueElement el)
 {
     lock(lockListObject)
     {
         var oldItem = fileQueue.FirstOrDefault(e => e.File == el.File);
         if (oldItem != null)
         {
             fileQueue.Remove(oldItem);
             RaiseChanged(oldItem, FileQueueAction.Pop);
         }
         fileQueue.Add(el);
         RaiseChanged(el, FileQueueAction.Push);
     }
 }
Exemplo n.º 3
0
 private void RaiseChanged(FileQueueElement element, FileQueueAction action)
 {
     var itemElement = element;
     var itemAction = action;
     if (Changed != null)
         Changed(this, new FileQueueChangedArgs(itemElement, itemAction));
 }