Ejemplo n.º 1
0
        private async void OpenFileDialogOnFileOk(object sender,
                                                  CancelEventArgs cancelEventArgs)
        {
            using (new WaitCursor())
            {
                try
                {
                    ShowStatus("Please wait.... downloading package information"
                               , ContinuousProgressBarCommand.Start, ProgressResultType.Info);

                    _filePath = _openFileDialog.FileName;
                    PackageRetrieveOptions options = new PackageRetrieveOptions(_filePath, AlwaysLoadFromInternetCheckBox.IsChecked.GetValueOrDefault(false));
                    _manifest = await _nugetPackageManager.GetPackageInformation(options);

                    TextBlockProjectTitle.Text = $"{_manifest.Metadata.Id} {_manifest.Metadata.Version}";
                    VersionTextBox.Text        = GetNewVersion();

                    dataGrid.ItemsSource = GetDependecies(options);

                    ShowStatus("Package information loaded", ContinuousProgressBarCommand.End, ProgressResultType.Info);
                }
                catch (Exception ex)
                {
                    ShowStatus("Could not load package information." + ex.Message,
                               ContinuousProgressBarCommand.End, ProgressResultType.Failure);
                }
            }
        }