Ejemplo n.º 1
0
        public static IScriptCommand IfMouseGesture(MouseGesture gesture,
                                                    IScriptCommand nextCommand = null, IScriptCommand otherwiseCommand = null)
        {
            string MouseGestureVariable = "{IfMouseGesture-Gesture}";

            return
                (ScriptCommands.Assign(MouseGestureVariable, gesture, false,
                                       HubScriptCommands.IfMouseGesture(MouseGestureVariable, nextCommand, otherwiseCommand)));
        }
Ejemplo n.º 2
0
 /// <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))
                                                                      )));
 }