void DynamoViewModelRequestShowPackageManagerSearch(object s, EventArgs e) { 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(); }
void _vm_RequestShowPackageManagerSearch(object s, EventArgs e) { if (_searchPkgsView == null) { var pms = new PackageManagerSearchViewModel(dynSettings.PackageManagerClient); _searchPkgsView = new PackageManagerSearchView(pms); _searchPkgsView.Closed += (sender, args) => _searchPkgsView = null; _searchPkgsView.Show(); } _searchPkgsView.Focus(); }
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(); }