using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static PDDCircleFriends.Enums;
namespace PDDCircleFriends
{
public class Tools
{
///
/// 将枚举中的string转int
///
///
///
public static int FindCategoryNum(string data)
{
return (int)((CategoryType)Enum.Parse(typeof(CategoryType), data));
}
///
/// 获取中文店铺枚举对应的数值值
///
///
///
public static int FindShopScoreVlaue(ShopScoreType shopScore)
{
int value = -1;
switch (shopScore)
{
case ShopScoreType.不限:
case ShopScoreType.四点六:
value = 460;
break;
case ShopScoreType.五点零:
value = 500;
break;
case ShopScoreType.四点九:
value = 490;
break;
case ShopScoreType.四点八:
value = 480;
break;
case ShopScoreType.四点七:
value = 470;
break;
}
return value;
}
}
}