public void switchMode(int ind) { ITouchpadBehaviour currentMode = modes.ElementAt(currentTypeInd); device.Touchpad.TouchButtonDown -= currentMode.touchButtonDown; device.Touchpad.TouchButtonUp -= currentMode.touchButtonUp; device.Touchpad.TouchesBegan -= currentMode.touchesBegan; device.Touchpad.TouchesMoved -= currentMode.touchesMoved; device.Touchpad.TouchesEnded -= currentMode.touchesEnded; device.Touchpad.TouchUnchanged -= currentMode.touchUnchanged; setMode(ind); }
public void TouchPadOn(int ind, DS4Device device) { ITouchpadBehaviour tPad = touchPad[ind]; device.Touchpad.TouchButtonDown += tPad.touchButtonDown; device.Touchpad.TouchButtonUp += tPad.touchButtonUp; device.Touchpad.TouchesBegan += tPad.touchesBegan; device.Touchpad.TouchesMoved += tPad.touchesMoved; device.Touchpad.TouchesEnded += tPad.touchesEnded; device.Touchpad.TouchUnchanged += tPad.touchUnchanged; //LogDebug("Touchpad mode for " + device.MacAddress + " is now " + tmode.ToString()); //Log.LogToTray("Touchpad mode for " + device.MacAddress + " is now " + tmode.ToString()); Global.ControllerStatusChanged(this); }
public void setMode(int ind) { ITouchpadBehaviour tmode = modes.ElementAt(ind % modes.Count); device.Touchpad.TouchButtonDown += tmode.touchButtonDown; device.Touchpad.TouchButtonUp += tmode.touchButtonUp; device.Touchpad.TouchesBegan += tmode.touchesBegan; device.Touchpad.TouchesMoved += tmode.touchesMoved; device.Touchpad.TouchesEnded += tmode.touchesEnded; device.Touchpad.TouchUnchanged += tmode.touchUnchanged; currentTypeInd = ind; LogDebug("Touchpad mode for " + device.MacAddress + " is now " + tmode.ToString()); Log.LogToTray("Touchpad mode for " + device.MacAddress + " is now " + tmode.ToString()); Global.ControllerStatusChanged(this); }
public void TouchPadOn(int ind, DS4Device device) { ITouchpadBehaviour tPad = touchPad[ind]; device.Touchpad.TouchButtonDown += tPad.touchButtonDown; device.Touchpad.TouchButtonUp += tPad.touchButtonUp; device.Touchpad.TouchesBegan += tPad.touchesBegan; device.Touchpad.TouchesMoved += tPad.touchesMoved; device.Touchpad.TouchesEnded += tPad.touchesEnded; device.Touchpad.TouchUnchanged += tPad.touchUnchanged; //device.Touchpad.PreTouchProcess += delegate { touchPad[ind].populatePriorButtonStates(); }; device.Touchpad.PreTouchProcess += (sender, args) => { touchPad[ind].populatePriorButtonStates(); }; device.SixAxis.SixAccelMoved += tPad.sixaxisMoved; //LogDebug("Touchpad mode for " + device.MacAddress + " is now " + tmode.ToString()); //Log.LogToTray("Touchpad mode for " + device.MacAddress + " is now " + tmode.ToString()); }