private static bool Flick(List <TouchAction> actions) { var startPoint = actions[0].GetLocation(); var endPoint = actions[2].GetLocation(); return(TouchSimulator.Flick( (int)startPoint.X, (int)startPoint.Y, (int)endPoint.X, (int)endPoint.Y, actions[1].MiliSeconds)); }
string Flick() { if (!(this.ExecutedCommand.Parameters.ContainsKey("xspeed") && this.ExecutedCommand.Parameters.ContainsKey("yspeed"))) { // TODO: in the future '400 : invalid argument' will be used return(this.JsonResponse(ResponseStatus.UnknownError, "WRONG PARAMETERS")); } var xSpeed = this.ExecutedCommand.GetParameterAsInt("xspeed"); var ySpeed = this.ExecutedCommand.GetParameterAsInt("yspeed"); return(TouchSimulator.Flick(xSpeed, ySpeed) ? this.JsonResponse() : this.JsonResponse(ResponseStatus.UnknownError, "Touch input failed")); }