Ejemplo n.º 1
0
        public override void OnEnabled()
        {
            this.resetDrawing();

            // load Config.
            string configPath;

            try
            {
                configPath = JsonSettings.GetSettingsFilePath(Core.Me.Name, "OverlayMod.yaml");
            }
            catch (Exception)
            {
                configPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "settings", "OverlayMod.yaml");
            }

            loadConfig(configPath);

            Task.Factory.StartNew(RunRenderForm, TaskCreationOptions.LongRunning);

            _hotkeyId1 = HotKeyManager.RegisterHotKey(Keys.O, KeyModifiers.Shift | KeyModifiers.Alt);
            _hotkeyId2 = HotKeyManager.RegisterHotKey(Keys.I, KeyModifiers.Shift | KeyModifiers.Alt);
            HotKeyManager.HotKeyPressed += HotKeyManager_HotKeyPressed;
        }