コード例 #1
0
        public new void OnDeactivate(bool close)
        {
            base.OnDeactivate(close);

            SaveSelectedProfile();
            _loopManager.RenderCompleted -= LoopManagerOnRenderCompleted;
            KeybindManager.Remove(_copyKeybind);
            KeybindManager.Remove(_pasteKeybind);
        }
コード例 #2
0
        public override void Dispose()
        {
            foreach (var keybindModel in _keybindModels)
            {
                KeybindManager.Remove(keybindModel);
            }

            LuaManager.ProfileModel.OnProfileUpdatedEvent -= ProfileModelOnOnProfileUpdatedEvent;
        }
コード例 #3
0
        /// <summary>
        ///     If found, removes a keybind with the given name
        /// </summary>
        /// <param name="name"></param>
        public void RemoveKeybind(string name)
        {
            var existing = _keybindModels.FirstOrDefault(k => k.Name == name);

            if (existing != null)
            {
                _keybindModels.Remove(existing);
            }

            KeybindManager.Remove(name);
        }
コード例 #4
0
 public void Unregister()
 {
     if (_downKeybind != null)
     {
         KeybindManager.Remove(_downKeybind);
         _downKeybind = null;
     }
     if (_upKeybind != null)
     {
         KeybindManager.Remove(_upKeybind);
         _upKeybind = null;
     }
 }