@@ -123,11 +123,15 @@ public void HandleEvent(object sender, NotifyEvent e, HandlingPriority priority)
123123 }
124124 break ;
125125 case EventType . Keys :
126- var ke = e as KeyEvent ;
127- if ( ke . Value == PluginBase . MainForm . GetShortcutItemKeys ( ShortcutId . GotoPreviousMember ) )
126+ var value = ( ( KeyEvent ) e ) . Value ;
127+ if ( value == PluginBase . MainForm . GetShortcutItemKeys ( ShortcutId . GotoPreviousMember ) )
128128 GotoPreviousMember ( ) ;
129- else if ( ke . Value == PluginBase . MainForm . GetShortcutItemKeys ( ShortcutId . GotoNextMember ) )
129+ else if ( value == PluginBase . MainForm . GetShortcutItemKeys ( ShortcutId . GotoNextMember ) )
130130 GotoNextMember ( ) ;
131+ else if ( value == PluginBase . MainForm . GetShortcutItemKeys ( ShortcutId . GotoPreviousTab ) )
132+ GotoPreviousTab ( ) ;
133+ else if ( value == PluginBase . MainForm . GetShortcutItemKeys ( ShortcutId . GotoNextTab ) )
134+ GotoNextTab ( ) ;
131135 break ;
132136 }
133137 }
@@ -198,6 +202,8 @@ void CreateMenuItems()
198202 menu . DropDownItems . Add ( item ) ;
199203 PluginBase . MainForm . RegisterShortcutItem ( ShortcutId . GotoNextMember , Keys . None ) ;
200204 PluginBase . MainForm . RegisterShortcutItem ( ShortcutId . GotoPreviousMember , Keys . None ) ;
205+ PluginBase . MainForm . RegisterShortcutItem ( ShortcutId . GotoPreviousTab , Keys . None ) ;
206+ PluginBase . MainForm . RegisterShortcutItem ( ShortcutId . GotoNextTab , Keys . None ) ;
201207 }
202208
203209 /// <summary>
@@ -388,6 +394,24 @@ static List<MemberModel> GetCurrentFileMembers()
388394 return result ;
389395 }
390396
397+ static void GotoPreviousTab ( )
398+ {
399+ var documents = PluginBase . MainForm . Documents ;
400+ if ( documents . Length < 2 ) return ;
401+ var index = Array . IndexOf ( documents , PluginBase . MainForm . CurrentDocument ) - 1 ;
402+ if ( index == - 1 ) index = documents . Length - 1 ;
403+ documents [ index ] . Activate ( ) ;
404+ }
405+
406+ static void GotoNextTab ( )
407+ {
408+ var documents = PluginBase . MainForm . Documents ;
409+ if ( documents . Length < 2 ) return ;
410+ var index = Array . IndexOf ( documents , PluginBase . MainForm . CurrentDocument ) + 1 ;
411+ if ( index == documents . Length ) index = 0 ;
412+ documents [ index ] . Activate ( ) ;
413+ }
414+
391415 #endregion
392416
393417 static void SetDocumentClass ( [ NotNull ] MemberModel model )
0 commit comments