Пример #1
0
        private void UpdateSelectedRepository()
        {
            packageViewController.SetPackageViewStatus(Resources.NoItemsFoundLabel);
            packageViewController.ClearActiveRequests();
            if (installedButton.Checked)
            {
                packageView.OperationText = Resources.UninstallOperationName;
                packageViewController.SelectedRepository = PackageManager.LocalRepository;
            }
            else
            {
                var selectedItem = packageSourceComboBox.SelectedItem;
                if (!AggregateRepository.Equals(selectedItem))
                {
                    packageViewController.SelectedRepository = (SourceRepository)selectedItem;
                }
                else
                {
                    packageViewController.SelectedRepository = null;
                }

                if (updatesButton.Checked)
                {
                    packageView.OperationText = Resources.UpdateOperationName;
                }
                else
                {
                    packageView.OperationText = Resources.InstallOperationName;
                }
            }

            searchComboBox.Text = string.Empty;
            packageViewController.UpdatePackageQuery();
        }
Пример #2
0
        private void UpdateSelectedRepository()
        {
            packageViewController.SetPackageViewStatus(Resources.NoItemsFoundLabel);
            packageViewController.ClearActiveRequests();

            var selectedItem = packageSourceComboBox.SelectedItem;

            if (!AggregateRepository.Equals(selectedItem))
            {
                packageViewController.SelectedRepository = (SourceRepository)selectedItem;
            }
            else
            {
                packageViewController.SelectedRepository = null;
            }

            packageView.OperationText = Resources.OpenOperationName;
            searchComboBox.Text       = string.Empty;
            packageViewController.UpdatePackageQuery();
        }