75 lines
2.4 KiB
C#
75 lines
2.4 KiB
C#
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<long, ProductCollectBase> TaobaoProductTemp = new Dictionary<long, ProductCollectBase>();
|
|
public static Dictionary<long, KeyValuesBase> CatTemp = new Dictionary<long, KeyValuesBase>();
|
|
public static Dictionary<string, ImageUrlBase> ImageTemp = new Dictionary<string, ImageUrlBase>();
|
|
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加商品图片到到缓存
|
|
/// </summary>
|
|
/// <param name="key"></param>
|
|
/// <param name="value"></param>
|
|
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<string, int> PriceTemp = new Dictionary<string, int>();
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|