private bool StartTask(SyncList sl, SyncTask type, object argument, int shownList) { if (!itemWorker.IsBusy) { this.workingList = sl; SyncingList = shownList; sl.SetObservable(false); taskType = type; syncBar.Visibility = syncCancel.Visibility = System.Windows.Visibility.Visible; itemWorker.RunWorkerAsync(argument); return(true); } return(false); }
internal void CancelTask() { itemWorker.CancelAsync(); workingList.SetObservable(true); }