public static void UnlinkButtons(this IDPad dev, BasicTriList triList) { triList.ClearBoolSigAction(138); triList.ClearBoolSigAction(139); triList.ClearBoolSigAction(140); triList.ClearBoolSigAction(141); triList.ClearBoolSigAction(142); triList.ClearBoolSigAction(130); triList.ClearBoolSigAction(134); }
public static void LinkButtons(this IDPad dev, BasicTriList triList) { triList.SetBoolSigAction(138, dev.Up); triList.SetBoolSigAction(139, dev.Down); triList.SetBoolSigAction(140, dev.Left); triList.SetBoolSigAction(141, dev.Right); triList.SetBoolSigAction(142, dev.Select); triList.SetBoolSigAction(130, dev.Menu); triList.SetBoolSigAction(134, dev.Exit); }
public static void UnlinkActions(this IDPad dev, MobileControlSystemController controller) { var prefix = string.Format(@"/device/{0}/", (dev as IKeyed).Key); controller.RemoveAction(prefix + "up"); controller.RemoveAction(prefix + "down"); controller.RemoveAction(prefix + "left"); controller.RemoveAction(prefix + "right"); controller.RemoveAction(prefix + "select"); controller.RemoveAction(prefix + "menu"); controller.RemoveAction(prefix + "exit"); }
public static void LinkActions(this IDPad dev, MobileControlSystemController controller) { var prefix = string.Format(@"/device/{0}/", (dev as IKeyed).Key); controller.AddAction(prefix + "up", new PressAndHoldAction(dev.Up)); controller.AddAction(prefix + "down", new PressAndHoldAction(dev.Down)); controller.AddAction(prefix + "left", new PressAndHoldAction(dev.Left)); controller.AddAction(prefix + "right", new PressAndHoldAction(dev.Right)); controller.AddAction(prefix + "select", new PressAndHoldAction(dev.Select)); controller.AddAction(prefix + "menu", new PressAndHoldAction(dev.Menu)); controller.AddAction(prefix + "exit", new PressAndHoldAction(dev.Exit)); }