예제 #1
0
        private void LoadMouseEngineSettings()
        {
            if (mouseEnginePanel != null)
            {
                if (mouseEngineContainer.Controls.Contains(mouseEnginePanel))
                {
                    mouseEngineContainer.Controls.Remove(mouseEnginePanel);
                }
            }

            // Get our config index
            var index = cfg.Mouse_Eng_Type;

            MouseSettings.MouseEngineSettings engine = null;

            // By default we want to set engine as GenericControls
            if (index < TranslateMouse.MaxMouseMode)
            {
                engine = new MouseSettings.GenericControls(cfg);
            }

            if (engine == null)
            {
                engine = new MouseSettings.NoControls();
            }


            mouseEnginePanel = engine;
            mouseEngineContainer.Controls.Add(engine);
            engine.Dock = DockStyle.Fill;
        }
예제 #2
0
        private void LoadMouseEngineSettings()
        {
            if (mouseEnginePanel != null)
            {
                if (mouseEngineContainer.Controls.Contains(mouseEnginePanel))
                {
                    mouseEngineContainer.Controls.Remove(mouseEnginePanel);
                }
            }

            // By default we want to set engine as GenericControls
            if (cfg.Mouse_Eng_Type != MouseTranslationMode.NONE && cfg.Mouse_Eng_Type != MouseTranslationMode.INVALID)
            {
                mouseEnginePanel = new MouseSettings.GenericControls(cfg);
            }
            else
            {
                mouseEnginePanel = new MouseSettings.NoControls();
            }

            mouseEngineContainer.Controls.Add(mouseEnginePanel);
            mouseEnginePanel.Dock = DockStyle.Fill;
        }