示例#1
0
        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;
        }
示例#2
0
        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;
        }
示例#3
0
        public FilesToCleanBinding(Repository repository, TreeListBox treeListBox)
        {
            Verify.Argument.IsNotNull(repository, "repository");
            Verify.Argument.IsNotNull(treeListBox, "treeListBox");

            _repository  = repository;
            _treeListBox = treeListBox;

            Progress = treeListBox.ProgressMonitor;
        }
示例#4
0
        protected override void OnFetchFailed(Exception exception)
        {
            if (TreeListBox.IsDisposed)
            {
                return;
            }

            TreeListBox.BeginUpdate();
            TreeListBox.Items.Clear();
            TreeListBox.EndUpdate();
            TreeListBox.Cursor = Cursors.Default;
        }
示例#5
0
        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;
        }