Ejemplo n.º 1
0
 public OnButtonGestureDefinition(
     DSL.Def.WhenFunc whenFunc,
     DSL.Def.AcceptableInOnClause onButton
     ) : base(whenFunc)
 {
     this.onButton = onButton;
 }
Ejemplo n.º 2
0
 public OnButtonWithIfStrokeGestureDefinition(
     DSL.Def.WhenFunc whenFunc,
     DSL.Def.AcceptableInOnClause onButton,
     Def.Stroke stroke,
     DSL.Def.DoFunc doFunc
     ) : base(whenFunc, onButton)
 {
     this.stroke = stroke;
     this.doFunc = doFunc;
 }
Ejemplo n.º 3
0
 public IfButtonGestureDefinition(
     DSL.Def.WhenFunc whenFunc,
     DSL.Def.AcceptableInIfButtonClause ifButton,
     DSL.Def.BeforeFunc beforeFunc,
     DSL.Def.DoFunc doFunc,
     DSL.Def.AfterFunc afterFunc
     ) : base(whenFunc)
 {
     this.ifButton   = ifButton;
     this.beforeFunc = beforeFunc;
     this.doFunc     = doFunc;
     this.afterFunc  = afterFunc;
 }
Ejemplo n.º 4
0
 public GestureDefinition(
     DSL.Def.WhenFunc whenFunc
     )
 {
     this.whenFunc = whenFunc;
 }
Ejemplo n.º 5
0
 protected internal static bool EvaluateSafely(UserActionExecutionContext ctx, DSL.Def.WhenFunc func)
 {
     try
     {
         return(func(ctx));
     }
     catch (Exception ex)
     {
         Debug.Print(
             "An exception was thrown when executing a WhenFunc of a gesture. " +
             "This error may automatically be recovered.\n{0} :\n{1}",
             ex.GetType().Name,
             ex.StackTrace);
     }
     return(false);
 }
Ejemplo n.º 6
0
 public DSL.WhenElement @when(DSL.Def.WhenFunc func)
 {
     return(root.@when(func));
 }