public FileQueueChangedArgs(FileQueueElement element, FileQueueAction action) { this.Element = element; this.Action = action; }
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); } }
private void RaiseChanged(FileQueueElement element, FileQueueAction action) { var itemElement = element; var itemAction = action; if (Changed != null) Changed(this, new FileQueueChangedArgs(itemElement, itemAction)); }