public void OpenPackageSources() { if (packageSource == null) { packageSource = packageSourceFactory.Create(); packageSource.Closed += OnPackageSourceClosed; packageSource.Owner = application.MainWindow; packageSource.ShowDialog(); } else { packageSource.BringIntoView(); } }
private void OnPackageSourceClosed(object sender, EventArgs e) { packageSource.Closed -= OnPackageSourceClosed; packageSource = null; }