Beispiel #1
0
 private void DeletePackageButton_Click(object sender, EventArgs e)
 {
     try
     {
         if ((_presenter != null && _presenter.SelectedItem != null))
         {
             string packageFullName   = _presenter.SelectedItem.GetOriginalData().FullName;
             var    progressView      = new View.Progress.ProgressWindowView();
             var    progressPresenter = new Presenter.Progress.ProgressPresenter(progressView);
             progressPresenter.WindowTitle     = "Remove App Package";
             progressPresenter.TaskDescription = String.Format("Removing App Package {0}", packageFullName);
             progressView.Show();
             var manager   = new Services.Packages.PackageManager();
             var asyncTask = manager.RemovePackageAsync(progressPresenter, packageFullName);
             asyncTask.ContinueWith(task =>
             {
                 _presenter.UpdatePackageList();
             });
         }
     }
     catch (Exception ex)
     {
         Logger.Log(ex, "DeletePackageButton_Click");
     }
 }
Beispiel #2
0
        private async Task InstallAppxPackageAsync(string appPackagePath)
        {
            var progressView      = new View.Progress.ProgressWindowView();
            var progressPresenter = new Presenter.Progress.ProgressPresenter(progressView);

            progressPresenter.WindowTitle     = "Add App Package";
            progressPresenter.TaskDescription = String.Format("Adding App Package {0}", appPackagePath);
            progressView.Show();
            var manager = new Services.Packages.PackageManager();

            //await  manager.AddPackageAsync(progressPresenter, appPackagePath);
            _presenter.UpdatePackageList();
        }