public IEnumerable <TransferItem> ChildrenGetter(object p) { TransferItem directory = ((TransferItem)p); if (null == directory) { // Root if (!_cache.isValid(null)) { _cache.put(null, new AttributedList(Transfer.getRoots())); Filter(); } } else if (!_cache.isValid(directory)) { _controller.Background(new TransferPromptListAction(this, _controller, _source, _destination, directory, Transfer, _cache)); } // Return list with filtered files included AttributedList list = _cache.get(directory); for (int i = 0; i < list.size(); i++) { yield return((TransferItem)list.get(i)); } }
public IEnumerable <Path> ChildrenGetter(object folder) { AttributedList list = _cache.get((Path)folder) .filter(_controller.FilenameComparator, _controller.FilenameFilter); for (int i = 0; i < list.size(); i++) { yield return((Path)list.get(i)); } }
public IEnumerable <TreePathReference> GetEnumerator() { if (null == _controller.Workdir) { yield break; } AttributedList list = _controller.Workdir.children(_controller.FilenameFilter); for (int i = 0; i < list.size(); i++) { yield return(new TreePathReference((Path)list.get(i))); } }
public override void chunk(Path parent, AttributedList list) { if (_supressed) { return; } try { base.chunk(parent, list); } catch (ListCanceledException e) { if (_controller.Visible) { AtomicBoolean c = new AtomicBoolean(true); AsyncController.AsyncDelegate d = delegate { _controller.CommandBox( string.Format(LocaleFactory.localizedString("Listing directory {0}", "Status"), string.Empty), string.Format(LocaleFactory.localizedString("Listing directory {0}", "Status"), string.Empty), string.Format( LocaleFactory.localizedString("Continue listing directory with more than {0} files.", "Alert"), e.getChunk().size()), string.Format("{0}|{1}", LocaleFactory.localizedString("Continue", "Credentials"), LocaleFactory.localizedString("Cancel")), false, LocaleFactory.localizedString("Always"), TaskDialogIcon.Warning, delegate(int option, bool verificationChecked) { if (option == 0) { _supressed = true; } if (option == 1) { c.SetValue(false); } if (verificationChecked) { _supressed = true; disable(); } }); }; _controller.Invoke(d, true); if (!c.Value) { throw e; } } } }