Exemplo n.º 1
0
        protected override void OnBeforeInitialModuleScreenSetAsRoot()
        {
            base.OnBeforeInitialModuleScreenSetAsRoot();

            try
            {
                if (_hotkeyManager == null)
                {
                    _hotkeyManager = HotKeyManager.Create("mbbannerlord.autorun");
                    _hotkeyManager.Add <AutoRunHotKey>();
                    _hotkeyManager.Build();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Failed initializing auto-run hotkey:\n" + ex.ToString());
            }
        }