blob: d8457f75c891b08f03debe93ca0da3060435416f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
using System;
using System.Text;
namespace XMainClient.UI
{
internal struct AttrParam
{
public static StringBuilder TextSb = new StringBuilder();
public static StringBuilder ValueSb = new StringBuilder();
public string strText;
public string strValue;
public bool IsShowTipsIcon;
public string IconName;
public static void ResetSb()
{
AttrParam.TextSb.Length = 0;
AttrParam.ValueSb.Length = 0;
}
public static void Append(StringBuilder sb, string s, string color = "")
{
bool flag = !string.IsNullOrEmpty(color);
if (flag)
{
sb.Append("[").Append(color).Append("]");
}
sb.Append(s);
bool flag2 = !string.IsNullOrEmpty(color);
if (flag2)
{
sb.Append("[-]");
}
}
public static void Append(XItemChangeAttr attr, string textColor = "", string valueColor = "")
{
AttrParam.Append(AttrParam.TextSb, XAttributeCommon.GetAttrStr((int)attr.AttrID), textColor);
AttrParam.Append(AttrParam.ValueSb, XAttributeCommon.GetAttrValueStr((int)attr.AttrID, attr.AttrValue), valueColor);
}
public void SetTextFromSb()
{
this.strText = AttrParam.TextSb.ToString();
}
public void SetValueFromSb()
{
this.strValue = AttrParam.ValueSb.ToString();
}
}
}
|