private void textBoxKeyPress(object sender, System.EventArgs e) { try { if (sender is TextBox) { TextBox tb = sender as TextBox; GuiTextBox gtb = guiController[tb.Name] as GuiTextBox; foreach (string functionName in gtb.GetEventHandlers("onkeypress")) { this.executioner.ExecuteFunction(functionName, gtb); } } } catch (Exception x) { //ZeusDisplayError formError = new ZeusDisplayError(x); //formError.ShowDialog(this); if (logger != null) { logger.LogException(x); } } }