private void MenuOptionsButton_Click(object sender, RoutedEventArgs e) { if (menuOptionsWindow == null) { menuOptionsWindow = new MenuOptionsWindow(transactController); menuOptionsWindow.Closed += DestroyMenuOptionsWindow; } if (!menuOptionsWindow.IsVisible) { IsEnabled = false; menuOptionsWindow.Show(); } else { menuOptionsWindow.Focus(); } }
private void DestroyMenuOptionsWindow(object sender, EventArgs e) { menuOptionsWindow = null; IsEnabled = true; }