Ejemplo n.º 1
0
        public async void AddDownload()
        {
            var validFileName = await _urlService.GetValideDownloadFile(Url);

            if (validFileName == null)
            {
                _show.Message(Ressources.DownloaderViewModel.WrongURL);
                return;
            }

            var download = Download.NewDownload(_selectFile.ShowSaveFileDialog(Path.GetFileName(validFileName)), Url);

            if (download == null)
            {
                _show.Message(Ressources.DownloaderViewModel.ErrorCreateDownload);
                return;
            }
            var neu = new DownloadViewModel(download, _createEngine.For(SelectedEngine));

            AreDownloadListShow      = true;
            AreDownloadStartpossible = true;
            Downloads.Add(neu);
        }