void RaiseActiveProfileChanged(IShortcutProfileManager shortcutProfileManager, ShortcutProfile oldActiveProfile, ShortcutProfile newActiveProfile) { var oldActiveProfileId = oldActiveProfile?.id ?? ShortcutManager.defaultProfileId; var newActiveProfileId = newActiveProfile?.id ?? ShortcutManager.defaultProfileId; var eventArgs = new ActiveProfileChangedEventArgs(oldActiveProfileId, newActiveProfileId); activeProfileChanged?.Invoke(eventArgs); }
internal ShortcutManagerImplementation(IShortcutProfileManager profileManager) { m_ShortcutProfileManager = profileManager; // TODO: Not sure if these events mean the same m_ShortcutProfileManager.activeProfileChanged += RaiseActiveProfileChanged; m_ShortcutProfileManager.shortcutBindingChanged += RaiseShortcutBindingChanged; }
public ShortcutManagerWindowViewController(SerializedShortcutManagerWindowState state, IDirectory directory, IBindingValidator bindingValidator, IShortcutProfileManager profileManager, IContextManager contextManager, IAvailableShortcutsChangedNotifier availableShortcutsChangedNotifier) { m_SerializedState = state; m_ShortcutProfileManager = profileManager; m_Directory = directory; m_ContextManager = contextManager; m_BindingValidator = bindingValidator; m_AvailableShortcutsChangedNotifier = availableShortcutsChangedNotifier; InitializeCategoryList(); BuildKeyMapBindingStateData(); PopulateShortcutsBoundToSelectedKey(); }
internal void Initialize(IShortcutProfileManager sender) { directory = new Directory(profileManager.GetAllShortcuts()); m_Trigger = new Trigger(directory, new ConflictResolver()); }
void OnLoadedProfilesChanged(IShortcutProfileManager shortcutProfileManager) { m_ShortcutManagerWindowView.RefreshProfiles(); }
void OnActiveProfileChanged(IShortcutProfileManager shortcutProfileManager, ShortcutProfile previousActiveProfile, ShortcutProfile currentActiveProfile) { UpdateInternalCache(); }
void OnActiveProfileChanged(IShortcutProfileManager sender, ShortcutProfile oldActiveProfile, ShortcutProfile newActiveProfile) { m_LastUsedProfileIdProvider.lastUsedProfileId = profileManager.activeProfile?.id; Initialize(); }
void OnShortcutBindingChanged(IShortcutProfileManager sender, Identifier identifier, ShortcutBinding oldBinding, ShortcutBinding newBinding) { Initialize(); }
void RaiseShortcutBindingChanged(IShortcutProfileManager shortcutProfileManager, Identifier identifier, ShortcutBinding oldBinding, ShortcutBinding newBinding) { var eventArgs = new ShortcutBindingChangedEventArgs(identifier.path, oldBinding, newBinding); shortcutBindingChanged?.Invoke(eventArgs); }
public ShortcutController(IDiscovery discovery) { profileManager = new ShortcutProfileManager(discovery.GetAllShortcuts()); profileManager.shortcutsModified += Initialize; profileManager.ApplyActiveProfile(); }
public ConflictResolver(IShortcutProfileManager profileManager, IContextManager contextManager, IConflictResolverView conflictResolverView) { m_ProfileManager = profileManager; m_ContextManager = contextManager; m_ConflictResolverView = conflictResolverView; }