private void DynamoViewModelRequestRequestPackageManagerPublish(PublishPackageViewModel model) { var cmd = Analytics.TrackCommandEvent("PublishPackage"); if (_pubPkgView == null) { _pubPkgView = new PublishPackageView(model) { Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner }; _pubPkgView.Closed += (sender, args) => { _pubPkgView = null; cmd.Dispose(); }; _pubPkgView.Show(); if (_pubPkgView.IsLoaded && IsLoaded) _pubPkgView.Owner = this; } _pubPkgView.Focus(); }
void DynamoViewModelRequestRequestPackageManagerPublish(PublishPackageViewModel model) { if (_pubPkgView == null) { _pubPkgView = new PublishPackageView(model) { Owner = this, WindowStartupLocation = WindowStartupLocation.CenterOwner }; _pubPkgView.Closed += (sender, args) => _pubPkgView = null; _pubPkgView.Show(); if (_pubPkgView.IsLoaded && IsLoaded) _pubPkgView.Owner = this; } _pubPkgView.Focus(); }
void DynamoViewModelRequestRequestPackageManagerPublish(PublishPackageViewModel model) { if (_pubPkgView == null) { _pubPkgView = new PublishPackageView(model); _pubPkgView.Closed += (sender, args) => _pubPkgView = null; _pubPkgView.Show(); if (_pubPkgView.IsLoaded && this.IsLoaded) _pubPkgView.Owner = this; } _pubPkgView.Focus(); }