Example #1
0
 public void ShowCode(ushort errorcode, int type = 0)
 {
     if (errorcode == 8)
     {
         if (type == 1)
         {
             this.Show(ETips.Tips_GoldNotEnough, Array.Empty <string>());
         }
         else if (type == 2)
         {
             this.Show(ETips.Tips_DiamondNotEnough, Array.Empty <string>());
         }
         else if (type == 3)
         {
             this.Show(ETips.Tips_KeyNotEnough, Array.Empty <string>());
         }
     }
     else if (errorcode == 10)
     {
         this.Show(ETips.Tips_EquipMaterialNotEnough, Array.Empty <string>());
     }
     else if (errorcode == 1)
     {
         if (type == 1)
         {
             this.Show(ETips.Tips_MailAlreadyGot, Array.Empty <string>());
         }
         else
         {
             this.Show(ETips.Tips_NetError, Array.Empty <string>());
         }
     }
     else
     {
         ETips tips = (ETips)((short)errorcode);
         if (!int.TryParse(tips.ToString(), out _))
         {
             this.Show(tips, Array.Empty <string>());
         }
         else
         {
             this.Show(ETips.Tips_NetError, Array.Empty <string>());
         }
     }
 }
Example #2
0
    public void Show(ETips type, Color color, params string[] args)
    {
        string languageByTID = GameLogic.Hold.Language.GetLanguageByTID(type.ToString(), args);

        this.ShowInternal(languageByTID, color);
    }