void _vm_RequestShowInstalledPackages(object s, EventArgs e) { if (_installedPkgsView == null) { _installedPkgsView = new InstalledPackagesView(); _installedPkgsView.Closed += (sender, args) => _installedPkgsView = null; _installedPkgsView.Show(); } _installedPkgsView.Focus(); }
void _vm_RequestShowInstalledPackages(object s, EventArgs e) { if (_installedPkgsView == null) { _installedPkgsView = new InstalledPackagesView(); _installedPkgsView.Closed += (sender, args) => _installedPkgsView = null; _installedPkgsView.Show(); if (_installedPkgsView.IsLoaded && this.IsLoaded) { _installedPkgsView.Owner = this; } } _installedPkgsView.Focus(); }
void DynamoViewModelRequestShowInstalledPackages(object s, EventArgs e) { if (_installedPkgsView == null) { _installedPkgsView = new InstalledPackagesView(new InstalledPackagesViewModel(dynamoViewModel, dynamoViewModel.Model.Loader.PackageLoader)); _installedPkgsView.Closed += (sender, args) => _installedPkgsView = null; _installedPkgsView.Show(); if (_installedPkgsView.IsLoaded && this.IsLoaded) { _installedPkgsView.Owner = this; } } _installedPkgsView.Focus(); }
void DynamoViewModelRequestShowInstalledPackages(object s, EventArgs e) { if (_installedPkgsView == null) { _installedPkgsView = new InstalledPackagesView(new InstalledPackagesViewModel(dynamoViewModel, dynamoViewModel.Model.PackageLoader)) { Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner }; _installedPkgsView.Closed += (sender, args) => _installedPkgsView = null; _installedPkgsView.Show(); if (_installedPkgsView.IsLoaded && IsLoaded) { _installedPkgsView.Owner = this; } } _installedPkgsView.Focus(); }