static void Main(string[] args) { if (args.Length == 0 || !int.TryParse(args[0], out int count)) { Console.WriteLine("No number specified, use 1000? Y/N"); if (Console.ReadLine().Equals("Y", StringComparison.OrdinalIgnoreCase)) { count = 1000; } else { return; } } DataSrc dataSrc = new DataSrc(); Console.WriteLine("Getting rank info..."); RankData rankData = dataSrc.GetRankQuery(1, count, DateTime.Now - new TimeSpan(3, 0, 0, 0), RankMode.Day); string dir = "./Pixivic"; if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); } dataSrc.DownloadImages(rankData.data, ImageSize.Original, NameType.ById, dir, (sender, args) => { Console.WriteLine(string.Format("Downloading... {0:F2}% of {1}, current task:{2}-{3}", args.Progress * 100, rankData.data.Length, args.Current.artistPreView.name, args.Current.title)); }); }
public static List <Catalago> SelectCatalago() { return(DataSrc.SelectCatalago()); }
public static List <Proveedor> SelectProveedor() { return(DataSrc.SelectProveedor()); }
public static List <Marca> SelectMarca() { return(DataSrc.SelectMarca()); }
public static List <Color> SelectColor() { return(DataSrc.SelectColor()); }
//Buissnes fill selectASP public static List <Tipo> SelectTipo() { return(DataSrc.SelectTipo()); }
public static void InsertImage(Imagen im) { DataSrc.InsertImagen(im); }
public static void InserProduct(Producto prod) { DataSrc.InsertProduct(prod); }
public static void UpdateProduct(Producto prod) { DataSrc.UpdateProduct(prod); }
public static List <ProductoInfo> ProductInfo(int id, string name) { return(DataSrc.ProductInfo(id, name)); }
public static List <Producto> SearchProd(int id, string name) { return(DataSrc.SearchProducts(id, name)); }
public static List <Imagen> GetImagenes(int id) { return(DataSrc.GetImagen(id)); }
public static List <Producto> GetProductos() { return(DataSrc.GetProductos()); }
public static void DeleteProduct(int id) { DataSrc.DeleteProduct(id); }