public bool Commit(IKeyBinds keybinds) { //逐次_keybindsを変更しているので同一インスタンスなら何もしなくていい if (keybinds != _keybinds) keybinds.Import(_keybinds); return true; }
public void OnKeyBindChanged(IKeyBinds newvalues) { foreach (MainWindow w in _windows) { w.ReloadMenu(_menu, false); } }
public bool Commit(IKeyBinds keybinds) { //逐次_keybindsを変更しているので同一インスタンスなら何もしなくていい if (keybinds != _keybinds) { keybinds.Import(_keybinds); } return(true); }
public KeyBindsWindow(IKeyBinds keyBinds, IGame game) { InitializeComponent(); this.edited = false; this.keyBinds = keyBinds; this.game = game; this.keyBindsDictionary = this.keyBinds.GetKeyBinds(game).ToDictionary(x => x.Key, y => y.Value); CreateChildren(game.CheatCodes); this.Closing += KeyBindsWindow_Closing; }
public MainWindow(IGameSource gameSource, IKeyBinds keyBinds) { InitializeComponent(); SetStatus(false); isFocused = false; gameSource.Load(); gamesComboBox.ItemsSource = gameSource.GameList; this.nativeMethods = new NativeMethods(); this.keyboardListener = new KeyboardListener(); keyboardListener.KeyDown += OnKeyPress; this.keyBinds = keyBinds; nativeMethods.WindowChanged += NativeMethods_WindowChanged; }
public void Import(IKeyBinds keybinds) { _data.Clear(); _keyToTag.Clear(); _commandToTag.Clear(); KeyBindConfiguration src = (KeyBindConfiguration)keybinds; //異なるIKeyBinds実装もあるかもしれないが foreach (Tag tag in src._data) { Tag newtag = tag.Clone(); _data.Add(newtag); _commandToTag.Add(tag.Command, newtag); if (newtag.Key != Keys.None) { _keyToTag.Add(newtag.Key, newtag); } } Debug.Assert(_keyToTag.Count == src._keyToTag.Count); }
public void OnKeyBindChanged(IKeyBinds newvalues) { foreach (MainWindow w in _windows) w.ReloadMenu(_menu, false); }
public void InitUI(IKeyBinds keybinds) { _keybinds = keybinds; InitKeyConfigUI(); }
public void Import(IKeyBinds keybinds) { _data.Clear(); _keyToTag.Clear(); _commandToTag.Clear(); KeyBindConfiguration src = (KeyBindConfiguration)keybinds; //異なるIKeyBinds実装もあるかもしれないが foreach (Tag tag in src._data) { Tag newtag = tag.Clone(); _data.Add(newtag); _commandToTag.Add(tag.Command, newtag); if (newtag.Key != Keys.None) _keyToTag.Add(newtag.Key, newtag); } Debug.Assert(_keyToTag.Count == src._keyToTag.Count); }