protected override void OnFetchCompleted(IList <TreeItem> data) { if (TreeListBox.IsDisposed) { return; } TreeListBox.BeginUpdate(); TreeListBox.Items.Clear(); foreach (var item in data) { if (item.ItemType == TreeItemType.Tree) { TreeListBox.Items.Add(new TreeDirectoryListItem( (TreeDirectory)item, TreeDirectoryListItemType.ShowNothing)); } else { TreeListBox.Items.Add(new TreeFileListItem( (TreeFile)item, true)); } } TreeListBox.EndUpdate(); TreeListBox.Cursor = Cursors.Default; }
public FilesToAddBinding(Repository repository, TreeListBox treeListBox) { Verify.Argument.IsNotNull(repository, nameof(repository)); Verify.Argument.IsNotNull(treeListBox, nameof(treeListBox)); Repository = repository; TreeListBox = treeListBox; Progress = treeListBox.ProgressMonitor; }
public FilesToCleanBinding(Repository repository, TreeListBox treeListBox) { Verify.Argument.IsNotNull(repository, "repository"); Verify.Argument.IsNotNull(treeListBox, "treeListBox"); _repository = repository; _treeListBox = treeListBox; Progress = treeListBox.ProgressMonitor; }
protected override void OnFetchFailed(Exception exception) { if (TreeListBox.IsDisposed) { return; } TreeListBox.BeginUpdate(); TreeListBox.Items.Clear(); TreeListBox.EndUpdate(); TreeListBox.Cursor = Cursors.Default; }
protected override void OnFetchCompleted(IList <TreeFile> data) { if (TreeListBox.IsDisposed) { return; } TreeListBox.BeginUpdate(); TreeListBox.Items.Clear(); foreach (var item in data) { TreeListBox.Items.Add(new TreeFileListItem(item, true)); } TreeListBox.EndUpdate(); TreeListBox.Cursor = Cursors.Default; }