private void UpdateIcon() { IList <IProgressView> selectedTransfers = View.SelectedTransfers; if (1 == selectedTransfers.Count) { Transfer transfer = GetTransferFromView(selectedTransfers[0]); if (transfer.getRoots().size() == 1) { if (transfer.getLocal() != null) { View.FileIcon = IconCache.IconForFilename(transfer.getRoot().local.getAbsolute(), IconCache.IconSize.Large); } else { View.FileIcon = IconCache.IconForPath(transfer.getRoot().remote, IconCache.IconSize.Large); } } else { View.FileIcon = IconCache.IconForName("multiple", 0); } } else { View.FileIcon = null; } }
public object GetIcon(Path path) { if (path.isVolume()) { return(IconCache.GetProtocolDisk(_controller.Session.getHost().getProtocol(), IconCache.IconSize.Small)); } return(IconCache.IconForPath(path, IconCache.IconSize.Small)); }
public object GetIcon(TransferItem item) { return(IconCache.IconForPath(item.remote, IconCache.IconSize.Small)); }