public MainWindow()
        {
            _downloadManager = DownloadManager.GetInstance();
            var viewModel = new MainWindowViewModel();

            _queueManagerViewModel = new QueueManagerViewModel();
            _downloadViewModel     = new NewDownloadViewModel();
            DataContext            = viewModel;
            InitializeComponent();
        }
Exemple #2
0
        public NewDownload(NewDownloadViewModel downloadViewModel)
        {
            InitializeComponent();
            _downloadManager     = DownloadManager.GetInstance();
            DestinationPath.Text = KnownFolders.GetPath(KnownFolder.Downloads);
            var urlstr = Clipboard.GetText();

            if (Uri.IsWellFormedUriString(urlstr, UriKind.RelativeOrAbsolute))
            {
                FilePath.Text = urlstr;
            }

            DataContext = downloadViewModel;
        }
Exemple #3
0
 public QueueManager(QueueManagerViewModel viewModel)
 {
     DataContext      = viewModel;
     _downloadManager = DownloadManager.GetInstance();
     InitializeComponent();
 }