void Init() { var listViewShortcuts = (IModelListViewShortcuts)Application.Model.Options; filterShortcut = ShortcutHelper.ParseBarShortcut(listViewShortcuts.FilterShortcut); groupShortcut = ShortcutHelper.ParseBarShortcut(listViewShortcuts.GroupShortcut); sortShortcut = ShortcutHelper.ParseBarShortcut(listViewShortcuts.SortShortcut); navigateBackShortcut = ShortcutHelper.ParseBarShortcut(listViewShortcuts.NavigateBackShortcut); navigateForwardShortcut = ShortcutHelper.ParseBarShortcut(listViewShortcuts.NavigateForwardShortcut); }
void AddShortcuts(IEnumerable <PropertyEditor> propertyEditors) { foreach (PropertyEditor propertyEditor in propertyEditors) { var shortcut = ((IModelPropertyEditorFocusControlByShortcut)propertyEditor.Model).FocusShortcut; if (!string.IsNullOrEmpty(shortcut)) { _shortCuts.Add(ShortcutHelper.ParseBarShortcut(shortcut).Key, propertyEditor); } var listEditor = propertyEditor as ListPropertyEditor; if (listEditor != null && listEditor.Frame != null) { var listView = ((ListView)((ListPropertyEditor)propertyEditor).Frame.View); if (listView != null) { var listViewInfoNodeWrapper = listView.Model; if (listViewInfoNodeWrapper.MasterDetailMode == MasterDetailMode.ListViewAndDetailView) { AddShortcuts(listView.EditView.GetItems <PropertyEditor>()); } } } } }