private void codeTextbox_BeforeKeyPressed(object sender, KeyPressEventArgs e) { if (TextFile == null) { return; } TextFile.BeforeKeyPressed(e); }