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; }
protected internal static void ExecuteSafely(UserActionExecutionContext ctx, DSL.Def.AfterFunc func) { try { func(ctx); } catch (Exception ex) { Debug.Print( "An exception was thrown when executing a AfterFunc of a gesture. " + "This error may automatically be recovered.\n{0} :\n{1}", ex.GetType().Name, ex.StackTrace); } }