namespace Swyper {
public class TwoDotSwype
{
public static void LowToTop(int speed, IZennoPosterProjectModel project, Instance instance) {
var droid = instance.DroidInstance;
Random rnd = new Random();
int stock_screen_height = Int32.Parse(project.Variables["stock_screen_height"].Value);
int stock_screen_width = Int32.Parse(project.Variables["stock_screen_width"].Value);
int xStart = stock_screen_width - (stock_screen_width / 3) - rnd.Next(1, stock_screen_width / 2);
int yStart = stock_screen_height - (stock_screen_height / 4) - rnd.Next(1, stock_screen_width / 10) - 220;
int yFinish = stock_screen_height - (stock_screen_height / 2) - rnd.Next(1, stock_screen_width / 8);
int xFinish = stock_screen_width - (stock_screen_width / 3) - rnd.Next(1, stock_screen_width / 2);
//project.SendInfoToLog("Старт ширина/высота: "+xStart+"/"+yStart+ " | Стоп ширина/высота: "+xFinish+"/"+yFinish);
droid.Input.SwipeCurved(xStart, yStart, xFinish, yFinish, speed);
}
public static void TopToLow(int speed, IZennoPosterProjectModel project, Instance instance) {
var droid = instance.DroidInstance;
Random rnd = new Random();
int stock_screen_height = Int32.Parse(project.Variables["stock_screen_height"].Value);
int stock_screen_width = Int32.Parse(project.Variables["stock_screen_width"].Value);
int xStart = stock_screen_width - (stock_screen_width / 3) - rnd.Next(1, stock_screen_width / 2);
int yStart = stock_screen_height - (stock_screen_height / 4) - rnd.Next(1, stock_screen_width / 10);
int xFinish = stock_screen_width - (stock_screen_width / 3) - rnd.Next(1, stock_screen_width / 2);
int yFinish = stock_screen_height - (stock_screen_height / 2) - rnd.Next(1, stock_screen_width / 10);
//project.SendInfoToLog("Старт ширина/высота: "+xFinish+"/"+yFinish+ " | Стоп ширина/высота: "+xStart+"/"+finish_stock_screen_height_minus_percent);
droid.Input.SwipeCurved(xFinish, yFinish, xStart, yStart, speed); //Старт ширина/высота. Стоп ширина/высота.
}
}
}