private void Window_Closing(object sender, EventArgs e) { NewFileItem_Click(null, null); debugThread?.Abort(); textEditor?.clearHover(); codeWindow?.Close(); codeWindow = null; Application.Current.Shutdown(); }
private static void SoftwareCode(object sender, ExecutedRoutedEventArgs e) { MainWindow mainWindow = (MainWindow)sender; if (IsLicenseStateValid()) { if (_codeWindow == null) { _codeWindow = new CodeWindow(mainWindow); _codeWindow.Show(); } else { _codeWindow.Close(); _codeWindow = new CodeWindow(mainWindow); _codeWindow.Show(); } } }