private void BtnViewQueue_Click(object sender, RoutedEventArgs e) { // view the queue var queue = new JobQueueWindow(this); queue.Show(); }
public JobQueueWindow(Window ownerWindow) { this.Owner = ownerWindow; InitializeComponent(); if (ActiveWindow != null) { ActiveWindow.Close(); } ActiveWindow = this; MainWindow.ActiveViewModel.JobsCollectionChanged += ActiveViewModel_JobsCollectionChanged; Closing += (a, b) => MainWindow.ActiveViewModel.JobsCollectionChanged -= ActiveViewModel_JobsCollectionChanged; }