Ejemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="filterName">Filter name, same as host name</param>
 /// <param name="pmSearchViewModel">a reference of the PackageManagerSearchViewModel</param>
 public FilterEntry(string filterName, PackageManagerSearchViewModel packageManagerSearchViewModel)
 {
     FilterName        = filterName;
     FilterCommand     = new DelegateCommand <object>(SetFilterHosts, CanSetFilterHosts);
     pmSearchViewModel = packageManagerSearchViewModel;
     OnChecked         = false;
 }
Ejemplo n.º 2
0
        void DynamoViewModelRequestShowPackageManagerSearch(object s, EventArgs e)
        {
            if (!DisplayTermsOfUseForAcceptance())
                return; // Terms of use not accepted.

            if (_pkgSearchVM == null)
            {
                _pkgSearchVM = new PackageManagerSearchViewModel(dynamoViewModel.PackageManagerClientViewModel);
            }

            if (_searchPkgsView == null)
            {
                _searchPkgsView = new PackageManagerSearchView(_pkgSearchVM)
                {
                    Owner = this,
                    WindowStartupLocation = WindowStartupLocation.CenterOwner
                };

                _searchPkgsView.Closed += (sender, args) => _searchPkgsView = null;
                _searchPkgsView.Show();

                if (_searchPkgsView.IsLoaded && IsLoaded) _searchPkgsView.Owner = this;
            }

            _searchPkgsView.Focus();
            _pkgSearchVM.RefreshAndSearchAsync();
        }
Ejemplo n.º 3
0
        void _vm_RequestShowPackageManagerSearch(object s, EventArgs e)
        {
            if (_pkgSearchVM == null)
            {
                _pkgSearchVM = new PackageManagerSearchViewModel(dynSettings.PackageManagerClient);
            }

            if (_searchPkgsView == null)
            {
                _searchPkgsView = new PackageManagerSearchView(_pkgSearchVM);
                _searchPkgsView.Closed += (sender, args) => _searchPkgsView = null;
                _searchPkgsView.Show();

                if (_searchPkgsView.IsLoaded && this.IsLoaded) _searchPkgsView.Owner = this;
            }
            
            _searchPkgsView.Focus();
            _pkgSearchVM.RefreshAndSearchAsync();
        }
Ejemplo n.º 4
0
 private void ShowPackageManagerSearch()
 {
     var pms = new PackageManagerSearchViewModel(Controller.PackageManagerClient);
     var window = new PackageManagerSearchView(pms);
     window.Show();
 }