private void AddCodeLanguage(object sender, EventArgs e) { CodeWindow senderWindow = (sender as CodeWindow); if (!senderWindow.OK) { return; } _markdown.CodeLines(senderWindow?.Language); }
private void SyntaxCode_Click(object sender, EventArgs e) { using CodeWindow codeWindow = new CodeWindow(); codeWindow.FormClosed += AddCodeLanguage; codeWindow.ShowDialog(this); }