Example #1
0
        private void NewQueueCommand_OnClick(object sender, RoutedEventArgs e)
        {
            var newQueueWindow = new EditQueue();

            if (newQueueWindow.ShowDialog() == true)
            {
                _downloadManager.CreateQueue(newQueueWindow.CurrentQueue);
            }
        }
Example #2
0
        private void Queue_DoubleClick(object sender, MouseButtonEventArgs e)
        {
            var rowControl     = e.OriginalSource as FrameworkElement;
            var queueViewModel = rowControl?.DataContext as QueueViewModel;

            if (queueViewModel != null)
            {
                var queueEditWindow = new EditQueue(queueViewModel);
                queueEditWindow.ShowDialog();
            }
        }
Example #3
0
        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;
                }
            }
        }