private void NewQueueCommand_OnClick(object sender, RoutedEventArgs e) { var newQueueWindow = new EditQueue(); if (newQueueWindow.ShowDialog() == true) { _downloadManager.CreateQueue(newQueueWindow.CurrentQueue); } }
private void NewQueueCommand_Click(object sender, RoutedEventArgs e) { var newQueueWindow = new EditQueue(); if (newQueueWindow.ShowDialog() == true) { var newDownloadViewModel = DataContext as NewDownloadViewModel; if (newDownloadViewModel != null) { _downloadManager.CreateQueue(newQueueWindow.CurrentQueue); var newQueueViewModel = newDownloadViewModel.Queues.FirstOrDefault(x => x.Name == newQueueWindow.CurrentQueue.Name); newDownloadViewModel.SelectedQueue = newQueueViewModel; } } }