dynamic HandleCursorUpDown(dynamic self, dynamic args) { var isUp = (bool)args [0]; // var isMod = (bool)args [1]; FocusSiblingEditorEvent evnt = null; if (isUp && proseMirror.shouldFocusPreviousEditor()) { evnt = new FocusSiblingEditorEvent( this, FocusSiblingEditorEvent.WhichEditor.Previous); } else if (!isUp && proseMirror.shouldFocusNextEditor()) { evnt = new FocusSiblingEditorEvent( this, FocusSiblingEditorEvent.WhichEditor.Next); } if (evnt == null) { return(false); } EventsObserver.OnNext(evnt); return(true); }
void HandleFocusSiblingEditor(FocusSiblingEditorEvent evnt) { switch (evnt.Which) { case FocusSiblingEditorEvent.WhichEditor.Previous: FocusPreviousCell(); break; case FocusSiblingEditorEvent.WhichEditor.Next: FocusNextCell(); break; } }