protected virtual void OnKeyPressed(KeyPressedEventArgs e) { if (KeyPressed != null) { KeyPressed(this, e); } }
private void _OnKeyPressed(object sender, KeyPressedEventArgs e) { Trace.Call(sender, e); #if LOG4NET _Logger.Debug("_OnKeyPressed(): e.Key: " + e.Key + " e.Focus: " + e.Focus); #endif switch (e.Key) { case "ENTER": OnActivated(EventArgs.Empty); break; case "NPAGE": _MainWindow.ChatViewManager.ActiveChat.ScrollToEnd(); break; } }