private void openAITrainingHubWindowButton_Click(object sender, RoutedEventArgs e) { if (AITrainingHub != null) { AITrainingHub.Focus(); } else { AITrainingHub = new AITrainingHubWindow(); AITrainingHub.Closed += AITrainingHub_Closed; AITrainingHub.Owner = this; AITrainingHub.Show(); } PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("OpenAITrainingHubWindowButton_Content")); }
private void AITrainingHub_Closed(object sender, EventArgs e) { Focus(); AITrainingHub = null; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("OpenAITrainingHubWindowButton_Content")); }