From eebcc6e6cd1edd71945dc90cc697ffe013123466 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 14 三月 2019 11:47:31 +0800
Subject: [PATCH] 6340  【前端】【2.0】境界改版开发单

---
 Utility/UIHelper.cs |   96 ++++++++++++++++++++++++-----------------------
 1 files changed, 49 insertions(+), 47 deletions(-)

diff --git a/Utility/UIHelper.cs b/Utility/UIHelper.cs
index 89fa845..972ff84 100644
--- a/Utility/UIHelper.cs
+++ b/Utility/UIHelper.cs
@@ -31,21 +31,21 @@
     public static string GetSuitNameByName(string attrName)
     {
         string suitStr = "";
-        for(int i = 0; i < attrName.Length; i++)
+        for (int i = 0; i < attrName.Length; i++)
         {
-            if(i != attrName.Length - 1)
+            if (i != attrName.Length - 1)
             {
                 if (attrName.Length == 2)
                 {
-                    suitStr = StringUtility.Contact(suitStr,attrName[i],"        ");
+                    suitStr = StringUtility.Contact(suitStr, attrName[i], "        ");
                 }
-                else if(attrName.Length == 3)
+                else if (attrName.Length == 3)
                 {
-                    suitStr = StringUtility.Contact(suitStr,attrName[i], "  ");
+                    suitStr = StringUtility.Contact(suitStr, attrName[i], "  ");
                 }
                 else
                 {
-                    suitStr = StringUtility.Contact(suitStr,attrName[i]);
+                    suitStr = StringUtility.Contact(suitStr, attrName[i]);
                 }
             }
             else
@@ -54,7 +54,7 @@
             }
         }
         return suitStr;
-      
+
     }
 
     public static void SetItemBackGround(this Image _image, int itemColor)
@@ -255,16 +255,16 @@
     {
         _textBuilder.Length = 0;
         float hm = (float)Math.Round(num / 100000000, 2);
-        if(hm >= 100)
+        if (hm >= 100)
         {
             hm = (int)Math.Round(num / 100000000);
             _textBuilder.Append(hm);
             _textBuilder.Append(Language.Get("L1070"));
             return _textBuilder.ToString();
         }
-        else if(hm >= 10)
+        else if (hm >= 10)
         {
-            hm = (float)Math.Round(num / 100000000,1);
+            hm = (float)Math.Round(num / 100000000, 1);
             _textBuilder.Append(hm);
             _textBuilder.Append(Language.Get("L1070"));
             return _textBuilder.ToString();
@@ -275,7 +275,7 @@
             _textBuilder.Append(Language.Get("L1070"));
             return _textBuilder.ToString();
         }
-        
+
         float tt = (float)Math.Round(num / 10000, 2);
         if (tt >= 100)
         {
@@ -284,14 +284,14 @@
             _textBuilder.Append(Language.Get("L1071"));
             return _textBuilder.ToString();
         }
-        else if(tt >= 10)
+        else if (tt >= 10)
         {
-            tt = (float)Math.Round(num / 10000,1);
+            tt = (float)Math.Round(num / 10000, 1);
             _textBuilder.Append(tt);
             _textBuilder.Append(Language.Get("L1071"));
             return _textBuilder.ToString();
         }
-        else if(tt >= 1)
+        else if (tt >= 1)
         {
             _textBuilder.Append(tt);
             _textBuilder.Append(Language.Get("L1071"));
@@ -300,7 +300,7 @@
 
         if (_textBuilder.Length == 0)
         {
-            tt = (float)Math.Round(num,2);
+            tt = (float)Math.Round(num, 2);
             _textBuilder.Append(tt);
         }
         return _textBuilder.ToString();
@@ -324,7 +324,7 @@
             sb.Append(Language.Get("L1070"));
             return sb.ToString();
         }
-        else if(hm >= 1)
+        else if (hm >= 1)
         {
             sb.Append(hm);
             sb.Append(Language.Get("L1070"));
@@ -339,7 +339,7 @@
             sb.Append(Language.Get("L1071"));
             return sb.ToString();
         }
-      
+
         if (sb.Length == 0)
         {
             tt = (float)Math.Round(num, 2);
@@ -390,7 +390,7 @@
 
     public static string GetColorNameByItemColor(int itemColor)
     {
-        switch(itemColor)
+        switch (itemColor)
         {
             case 1:
                 return Language.Get("Market_Text_42");
@@ -411,21 +411,21 @@
     #endregion
 
     #region 鏂囧瓧鑹插��
-    public static readonly Color32 s_BrightPinkColor = new Color32(246, 64, 141, 255);
-    public static readonly Color32 s_BrightRedColor = new Color32(255, 3, 3, 255);
-    public static readonly Color32 s_BrightPurpleColor = new Color32(218, 72, 213, 255);
-    public static readonly Color32 s_BrightBlueColor = new Color32(0, 107, 227, 255); //006BE3FF
-    public static readonly Color32 s_BrightOrangeColor = new Color32(255, 103, 1, 255); //FF6701FF
-    public static readonly Color32 s_BrightWhiteColor = new Color32(104, 104, 104, 255); //686868
-    public static readonly Color32 s_BrightGreenColor = new Color32(16, 157, 6, 255); //109d06
+    public static readonly Color s_BrightPinkColor = new Color32(246, 64, 141, 255);
+    public static readonly Color s_BrightRedColor = new Color32(255, 3, 3, 255);
+    public static readonly Color s_BrightPurpleColor = new Color32(218, 72, 213, 255);
+    public static readonly Color s_BrightBlueColor = new Color32(0, 107, 227, 255); //006BE3FF
+    public static readonly Color s_BrightOrangeColor = new Color32(255, 103, 1, 255); //FF6701FF
+    public static readonly Color s_BrightWhiteColor = new Color32(104, 104, 104, 255); //686868
+    public static readonly Color s_BrightGreenColor = new Color32(16, 157, 6, 255); //109d06
 
-    public static readonly Color32 s_DarkPinkColor = new Color32(255, 124, 124, 255);
-    public static readonly Color32 s_DarkRedColor = new Color32(250, 1, 1, 255);
-    public static readonly Color32 s_DarkPurpleColor = new Color32(236, 75, 246, 255);
-    public static readonly Color32 s_DarkBlueColor = new Color32(49, 206, 251, 255);
-    public static readonly Color32 s_DarkOrangeColor = new Color32(248, 152, 59, 255);
-    public static readonly Color32 s_DarkWhiteColor = new Color32(247, 247, 247, 255);
-    public static readonly Color32 s_DarkGreenColor = new Color32(53, 225, 34, 255); //35e122
+    public static readonly Color s_DarkPinkColor = new Color32(255, 124, 124, 255);
+    public static readonly Color s_DarkRedColor = new Color32(250, 1, 1, 255);
+    public static readonly Color s_DarkPurpleColor = new Color32(236, 75, 246, 255);
+    public static readonly Color s_DarkBlueColor = new Color32(49, 206, 251, 255);
+    public static readonly Color s_DarkOrangeColor = new Color32(248, 152, 59, 255);
+    public static readonly Color s_DarkWhiteColor = new Color32(247, 247, 247, 255);
+    public static readonly Color s_DarkGreenColor = new Color32(53, 225, 34, 255); //35e122
 
     public static readonly Color s_NavyBrown = new Color32(64, 28, 6, 255);//401c06
     public static readonly Color s_Black = new Color32(0, 0, 0, 255);
@@ -434,7 +434,7 @@
     public static readonly Color s_LightYellow = new Color32(255, 244, 205, 255); //fff4cd
     public static readonly Color s_Gray = new Color32(204, 204, 204, 255);
 
-    public static readonly Color s_BrightDanLV0 = new Color32(102,102,102,255); //666666
+    public static readonly Color s_BrightDanLV0 = new Color32(102, 102, 102, 255); //666666
     public static readonly Color s_BrightDanLV1 = new Color32(148, 96, 255, 255); //9460ff
     public static readonly Color s_BrightDanLV2 = new Color32(0, 102, 255, 255); //0066ff
     public static readonly Color s_BrightDanLV3 = new Color32(0, 179, 55, 255); //00b337
@@ -442,18 +442,18 @@
     public static readonly Color s_BrightDanLV5 = new Color32(255, 0, 0, 255); //ff0000
     public static readonly Color s_BrightDanLV6 = new Color32(255, 0, 246, 255); //ff00f6
 
-    public static readonly Color s_GrayDanLV0 = new Color32(221,221, 221, 255); //dddddd
-    public static readonly Color s_GrayDanLV1 = new Color32(121,153, 255, 255); //7999ff
+    public static readonly Color s_GrayDanLV0 = new Color32(221, 221, 221, 255); //dddddd
+    public static readonly Color s_GrayDanLV1 = new Color32(121, 153, 255, 255); //7999ff
     public static readonly Color s_GrayDanLV2 = new Color32(0, 198, 255, 255); //00c6ff
     public static readonly Color s_GrayDanLV3 = new Color32(102, 255, 0, 255); //66ff00
     public static readonly Color s_GrayDanLV4 = new Color32(255, 144, 0, 255); //ff9000
     public static readonly Color s_GrayDanLV5 = new Color32(255, 0, 0, 255); //ff0000
     public static readonly Color s_GrayDanLV6 = new Color32(240, 0, 255, 255); //f000ff
 
-    public static Color GetDanLVColor(int danLv,bool bright = false)
+    public static Color GetDanLVColor(int danLv, bool bright = false)
     {
         var crossDanLVConfig = CrossServerArenaConfig.Get(danLv);
-        if(crossDanLVConfig != null)
+        if (crossDanLVConfig != null)
         {
             switch (crossDanLVConfig.DanType)
             {
@@ -597,6 +597,8 @@
                 return StringUtility.Contact("<color=#", "000000", ">", msg, "</color>");
             case TextColType.LightYellow:
                 return StringUtility.Contact("<color=#", "fff4cd", ">", msg, "</color>");
+            case TextColType.LightGreen:
+                return StringUtility.Contact("<color=#", "8ddc11", ">", msg, "</color>");
         }
         return msg;
     }
@@ -633,7 +635,7 @@
         }
     }
 
-    public static string GetRealmColorByLv(int realmLv,string msg, bool bright = false)
+    public static string GetRealmColorByLv(int realmLv, string msg, bool bright = false)
     {
         var config = RealmConfig.Get(realmLv);
         if (config == null)
@@ -643,7 +645,7 @@
         switch (config.Quality)
         {
             case 1:
-                return StringUtility.Contact("<color=#", bright ? "686868" : "f7f7f7", ">",msg, "</color>");
+                return StringUtility.Contact("<color=#", bright ? "686868" : "f7f7f7", ">", msg, "</color>");
             case 2:
                 return StringUtility.Contact("<color=#", bright ? "08d00a" : "08d00a", ">", msg, "</color>");
             case 3:
@@ -712,7 +714,7 @@
         {
             return 0;
         }
-        
+
         foreach (var _key in _propertyDict.Keys)
         {
             PlayerPropertyConfig cfg = PlayerPropertyConfig.Get(_key);
@@ -723,7 +725,7 @@
                     Equation.Instance.AddKeyValue("MinAtk", _propertyDict[_key]);
                     Equation.Instance.AddKeyValue("MaxAtk", _propertyDict[_key]);
                 }
-                else if(_key == 24)
+                else if (_key == 24)
                 {
                     Equation.Instance.AddKeyValue("PetMinAtk", _propertyDict[_key]);
                     Equation.Instance.AddKeyValue("PetMaxAtk", _propertyDict[_key]);
@@ -732,17 +734,17 @@
                 {
                     float attrValue = _propertyDict[_key];
                     int fightParm = GetFightPowerParmByAttrId(_key);
-                    if(_key == 11)
+                    if (_key == 11)
                     {
                         int playerLv = PlayerDatas.Instance.baseData.LV;
                         FightPowerParamConfig paramConfig = FightPowerParamConfig.Get(playerLv);
                         Equation.Instance.AddKeyValue("AtkSpeedParameter", paramConfig.AtkSpeedParameter);
                     }
-                    else if(_key == 15)
+                    else if (_key == 15)
                     {
                         int playerLv = PlayerDatas.Instance.baseData.LV;
                         FightPowerParamConfig paramConfig = FightPowerParamConfig.Get(playerLv);
-                        Equation.Instance.AddKeyValue("LuckyHitParameter",paramConfig.LuckyHitParameter);
+                        Equation.Instance.AddKeyValue("LuckyHitParameter", paramConfig.LuckyHitParameter);
                     }
                     else
                     {
@@ -754,7 +756,7 @@
                     Equation.Instance.AddKeyValue(cfg.Parameter, attrValue);
                 }
             }
-            
+
         }
         FuncConfigConfig funcCfg = FuncConfigConfig.Get(FightPowerFormula);
         return Equation.Instance.Eval<int>(funcCfg.Numerical1);
@@ -767,7 +769,7 @@
         PlayerPropertyConfig cfg = PlayerPropertyConfig.Get(attrId);
         if (paramConfig == null || cfg == null) return 0;
 
-        switch(cfg.Parameter)
+        switch (cfg.Parameter)
         {
             case "Hit":
                 return paramConfig.Hit;
@@ -893,7 +895,7 @@
     #region 寰楀埌瑁呭浣嶅搴旂殑閮ㄤ綅鍚嶇О
     public static string GetEquipPlaceName(int place)
     {
-        if(GeneralDefine.equipPlaceNameDict.ContainsKey(place))
+        if (GeneralDefine.equipPlaceNameDict.ContainsKey(place))
         {
             return GeneralDefine.equipPlaceNameDict[place];
         }

--
Gitblit v1.8.0