private void continueClick(object sender, RoutedEventArgs e) { // A separated session is created for the list of files for each user, in a different thread foreach (User u in destinations) { Trace.WriteLine("FTW.XAML.CS - ADDING FILE TRANSFER"); CLanFileTransfer cft = new CLanFileTransfer(u, files, CLanTransferType.SEND); cft.Start(); } if (NavigationService.CanGoBack) { NavigationService.GoBack(); } }
// Continue button controller private void ContinueClick(object sender, RoutedEventArgs e) { List <User> users = UserList.SelectedItems.OfType <User>().ToList(); // If any file was selected via right click if (FileList.Items.Count > 0) { List <CLanFile> files = FileList.Items.OfType <CLanFile>().ToList(); foreach (User u in users) { Trace.WriteLine("UW.XAML.CS - ADDING FILE TRANSFER"); CLanFileTransfer cft = new CLanFileTransfer(u, files, CLanTransferType.SEND); cft.Start(); } App.SelectedFiles.Clear(); } else { NavigationService.Navigate(new FileSelection(users)); } }