private void FilterCommandExecute(string tag) { AllTasks.Clear(); var transferTasks = FileTransferService.GetAllTransferTask(); switch (tag) { case null: transferTasks.ForEach(item => { AllTasks.Add(item); }); break; case "download": transferTasks.ForEach(item => { if (item.TransferType == TransferType.Download) { AllTasks.Add(item); } }); break; case "upload": transferTasks.ForEach(item => { if (item.TransferType == TransferType.Upload) { AllTasks.Add(item); } }); break; } }
public void Initialize() { var transferTasks = FileTransferService.GetAllTransferTask(); transferTasks.ForEach(item => { AllTasks.Add(item); }); }