public static IScriptCommand IfTouchGesture(TouchGesture gesture, IScriptCommand nextCommand = null, IScriptCommand otherwiseCommand = null) { string TouchGestureVariable = "{IfTouchGesture-Gesture}"; return (ScriptCommands.Assign(TouchGestureVariable, gesture, false, HubScriptCommands.IfTouchGesture(TouchGestureVariable, nextCommand, otherwiseCommand))); }
/// <summary> /// Assign destination to DragMethod.Menu if Mouse action is right click, otherwise DragMethod.Normal. /// </summary> /// <returns></returns> public static IScriptCommand AssignDragMethod(string variable, IScriptCommand nextCommand = null) { return (ScriptCommands.RunSequence(nextCommand, HubScriptCommands.IfMouseGesture(new MouseGesture() { MouseAction = MouseAction.RightClick }, ScriptCommands.Assign(variable, DragMethod.Menu), HubScriptCommands.IfTouchGesture(new TouchGesture() { TouchAction = UITouchGesture.Drag }, ScriptCommands.Assign(variable, DragMethod.Menu), ScriptCommands.Assign(variable, DragMethod.Normal)) ))); }