Esempio n. 1
0
 protected virtual void ShowDownloadWindow(RemoteAppcast appcast)
 {
     var viewModel = new DownloadWindowViewModel(_appInfo, _logger, RemoteContentDownloader);
     var destinationPath = CreateTempPath(appcast.ArtifactUrl);
     var window = new DownloadWindow { DataContext = viewModel };
     viewModel.ContinueCommand = new DelegateCommand(e =>
     {
         _logger.Log("Continue after downloading artifact");
         OnArtifactDownloadedEvent(new SingleEventArgs<string>(destinationPath));
         window.Close();
         OpenArtifact(destinationPath);
     });
     SetOwner(window);
     viewModel.StartAsync(appcast, destinationPath);
     window.ShowDialog();
 }
Esempio n. 2
0
 protected virtual void ShowDownloadWindow(RemoteAppcast appcast)
 {
     var viewModel = new DownloadWindowViewModel(_appInfo, _logger, RemoteContentDownloader);
     var artifactPath = CreateTempPath(appcast.ArtifactUrl);
     var window = new DownloadWindow { DataContext = viewModel };
     viewModel.ContinueWithInstallationCommand = new DelegateCommand(e =>
     {
         _logger.Log("Continue after downloading artifact");
         _analyticsLogger.LogContinueWithInstallation();
         OnArtifactDownloadedEvent(new SingleEventArgs<string>(artifactPath));
         window.Close();
         if (ShouldOpenArtifact(appcast, artifactPath))
         {
             OpenArtifact(artifactPath);
             _logger.Log("Opened artifact");
         }
     });
     SetOwner(window);
     viewModel.StartAsync(appcast, artifactPath);
     window.ShowDialog();
 }