using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading; using System.Windows.Forms; using AllBase; using Work.CollectClass; using Work.Api; using Work.ManageClass; namespace Work.ManageClass { public class UpPinduoduoProductSet { public static Dictionary TaobaoProductTemp = new Dictionary(); public static Dictionary CatTemp = new Dictionary(); public static Dictionary ImageTemp = new Dictionary(); public string Name, Cookies = "", Message = ""; public static string strContent = ""; public static bool RandomProps = false, TitleExploder = false, Shield = false, SaveAllImage = false, Relation = false; public bool FullToday = false, Punish = false, Success = false; public int MainCatId = 0; public TaobaoProductBase p; public TaobaoProductBase t; public TaobaoProductBase mt = null; public ShopChatBase Shop = null; public string brandName; public UpPinduoduoProductSet(string name, TaobaoProductBase P, TaobaoProductBase T) { Name = name; p = P; t = T; } /// /// 添加商品图片到到缓存 /// /// /// public static void AddImage(string key, string url, int width, int height) { if (string.IsNullOrEmpty(url)) return; if (ImageTemp.ContainsKey(key) && url.Contains("http:")) ImageTemp[key] = new ImageUrlBase(url, width, height); if (ImageTemp.ContainsKey(key) || string.IsNullOrEmpty(key) || string.IsNullOrEmpty(url)) return; try { ImageTemp.Add(key, new ImageUrlBase(url, width, height)); } catch { } } public Dictionary PriceTemp = new Dictionary(); } public class ImageUrlBase { public ImageUrlBase(string url, int w, int h) { Url = url; Width = w; Height = h; } public string Url; public int Width; public int Height; } }