using System;
using System.Collections.Generic;

namespace Stat.Items
{
   public class Alexa
    {
        /// <summary>
        /// Alexa
        /// </summary>
        /// <returns></returns>
       public static String[,] Get()
       {
           string[,] arr = new string[2, 2];

           arr[0, 0] = "0";
           arr[0, 1] = "未安装";

           arr[1, 0] = "1";
           arr[1, 1] = "已安装";

           return arr;
       }

       /// <summary>
       /// 
       /// </summary>
       /// <param name="list"></param>
       /// <returns></returns>
       public static List<Model.StatItem> Get(List<Model.StatItem> list)
       {
           foreach (Model.StatItem item in list)
           {
               item.Name = NumberToName(item.ID);
           }
           return list;
       }

       /// <summary>
       /// 根据 编号  获取名称
       /// </summary>
       /// <param name="Eno">编号</param>
       /// <returns>名称</returns>
       private static string NumberToName(int Eno)
       {
           string[,] arr = Get();
           string ss = "其他";
           for (int i = 0; i < arr.GetLength(0); i++)
           {
               if (arr[i, 0].ToString() == Eno.ToString())
               {
                   ss = arr[i, 1].ToString();
               }
           }
           return ss;
       }


    }
}
