private void lstBrowse_SelectionChanged(object sender, NavigationListControl.NavigationEventArgs e) { var meta = e.Item as MetaListItemInfo; if (meta == null) { return; } if (!Network.CheckNetwork()) { return; } if (meta.IsDir) { NavigateTo(meta.Path); return; } if (meta.Size > 10485760) // 10MB { MessageBox.Show(Properties.Resources.FileTooLarge); return; } progBusy.IsBusy = true; _client.DownloadAsync(meta.Path, x => OnFileDownloaded(x, meta.Path, meta.Title, meta.Modified), OnFileDownloadFailed); }
private void lstBrowse_SelectionChanged(object sender, NavigationListControl.NavigationEventArgs e) { var meta = e.Item as MetaListItemInfo; if (meta == null) { return; } if (!Network.CheckNetwork()) { return; } if (meta.IsDir) { NavigateTo(meta.Path); } else { progBusy.IsBusy = true; _client.DownloadAsync(meta.Path, x => OnFileDownloaded(x, meta.Path, meta.Title, meta.Modified), OnFileDownloadFailed); } }
public override void Download(ListItem item, Action <ListItem, byte[]> downloaded) { _client.DownloadAsync(_info.Path, x => downloaded(item, x), OnError); }