private void RemoveCompleted() { foreach (UploadParam info in DataSetInfos.Where(i => i.State == UploaderState.Complete)) { DataSetInfos.Remove(info); } }
private void DeleteProcess() { //foreach (object item in new ArrayList(DataSetListView.SelectedItems)) // DataSetInfos.Remove((UploadParam)item); DataSetInfos.Remove(SelectedItem); }
private void AddPlannedDataset() { var uploadParam = new UploadParam(SourceDataType.Csv); DataSetInfos.Add(uploadParam); DataSetInfos.OrderBy(info => info.Name); SelectedItem = uploadParam; OnActivateItem(); }
private void OnStart() { var notConfigured = DataSetInfos.Where(x => x.ConfigurationState == ConfigurationState.Incomplete).Select(x => x.Name); if (notConfigured.Count() > 0) { MessageBox.Show(Ressources.ViewR.ConfigItemError + ":\n - " + notConfigured.Aggregate((x, y) => y += "\n - " + x)); } _uploader.Run(); }
private void OnUpload() { var notConfigured = DataSetInfos.Where(x => x.ConfigurationState == ConfigurationState.Incomplete).Select(x => x.Name); if (notConfigured.Count() > 0) { MessageBox.Show("One or more items cannot be processed since they haven't been properly configured:\n - " + notConfigured.Aggregate((x, y) => y += "\n - " + x)); } _uploader.Run(); }
public void AddFiles(IEnumerable <string> files) { foreach (var fileName in files) { var file = new FileInfo(fileName); var name = Path.GetFileNameWithoutExtension(file.Name); // Remove duplicates. foreach (var item in DataSetInfos.Where(x => x.Name == name).ToArray()) { DataSetInfos.Remove(item); } var uploadParam = new UploadParam(fileName); uploadParam.VerifyConfiguration(); DataSetInfos.Add(uploadParam); } DataSetInfos.OrderBy(x => x.Name); }
private void Open() { DataSetInfos.Clear(); ShowSelectFilesDialog(); }
private void DeleteProcess() { DataSetInfos.Remove(SelectedItem); }
private void ClearAll() { DataSetInfos.Clear(); }
private bool CanRemoveCompleted() { return(IsIdle && DataSetInfos.Any(x => x.State == UploaderState.Complete)); }
private void CleanList() { DataSetInfos.Clear(); }