Beispiel #1
0
 /// <summary>
 /// 添加文本和数值 数据(type 1 百分比  / 2 千分比 )
 /// </summary>
 private void AddTextData(string text1, string text2, float data1, float data2, int type1 = 0, int type2 = 0)
 {
     if (data1 != 0)
     {
         if (type1 == 0)
         {
             m_lHeroDescData.Add(new DescData(text1, data1.ToString()));
         }
         else if (type1 == 1)
         {
             m_lHeroDescData.Add(new DescData(text1, NdUtil.ConvertPercent(data1)));
         }
         else if (type1 == 2)
         {
             m_lHeroDescData.Add(new DescData(text1, NdUtil.ConvertPermillage(data1)));
         }
     }
     if (data2 != 0)
     {
         if (type2 == 0)
         {
             m_lHeroDescData.Add(new DescData(text2, data1.ToString()));
         }
         else if (type2 == 1)
         {
             m_lHeroDescData.Add(new DescData(text2, NdUtil.ConvertPercent(data2)));
         }
         else if (type2 == 2)
         {
             m_lHeroDescData.Add(new DescData(text2, NdUtil.ConvertPermillage(data2)));
         }
     }
 }