示例#1
0
 public WoWmapper_DS4Plugin(bool LoadPlugin)
 {
     InitializeSettings();
     if (LoadPlugin)
     {
         Controller = new DS4();
         Controller.ButtonDown += Controller_ButtonDown;
         Controller.ButtonUp += Controller_ButtonUp;
         Controller.TouchpadMoved += Controller_TouchpadMoved;
     }
 }
示例#2
0
        public KeybindForm(DS4 InputDevice, SettingsFile BindFile)
        {
            InitializeComponent();
            kb = BindFile;
            device = InputDevice;
            labelBindHow.Text = Properties.Resources.STRING_BIND_HOW;

            labelTouchMode.Text = Properties.Resources.STRING_BIND_TOUCH_MODE;
            comboTouchMode.Items[0] = Properties.Resources.STRING_BIND_TOUCH_MOUSE;
            comboTouchMode.Items[1] = Properties.Resources.STRING_BIND_TOUCH_EXTRA;
            comboTouchMode.Items[2] = Properties.Resources.STRING_BIND_TOUCH_EMULATE;

            labelMovement.Text = Properties.Resources.STRING_BIND_MOVEMENT;
            labelCamera.Text = Properties.Resources.STRING_BIND_CAMERA;

            labelRightDead.Text = Properties.Resources.STRING_BIND_MOUSE_DEADZONE;
            labelRightSpeed.Text = Properties.Resources.STRING_BIND_MOUSE_SPEED;
            labelRightCurve.Text = Properties.Resources.STRING_BIND_MOUSE_CURVE;

            float rSpeed, rCurve, rDead;
            int touchMode;
            kb.Settings.Read("RightDead", out rDead);
            kb.Settings.Read("RightCurve", out rCurve);
            kb.Settings.Read("RightSpeed", out rSpeed);
            kb.Settings.Read("TouchMode", out touchMode);

            numRCurve.Value = (int)rCurve;
            numRSpeed.Value = (int)rSpeed;
            numRDeadzone.Value = (int)rDead;
            comboTouchMode.SelectedIndex = touchMode;

            // Set right stick panel to double buffered
            typeof(Panel).InvokeMember("DoubleBuffered",
                BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
                null, panelRStickAxis, new object[] { true });

            kb.Load();
            RefreshKeyBindings();
        }
示例#3
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    if (Controller != null)
                    {
                        Controller.Dispose();
                        Controller = null;
                    }
                }

                disposedValue = true;
            }
        }