protected string GetAttrText(int attrID) { if (!DataReader <Attrs> .Contains(attrID)) { return(string.Empty); } Attrs attrs = DataReader <Attrs> .Get(attrID); int num = (attrs.attrs.get_Count() >= attrs.values.get_Count()) ? attrs.values.get_Count() : attrs.attrs.get_Count(); if (num == 0) { return(string.Empty); } XDict <int, long> xDict = new XDict <int, long>(); for (int i = 0; i < num; i++) { if (xDict.ContainsKey(attrs.attrs.get_Item(i))) { XDict <int, long> xDict2; XDict <int, long> expr_80 = xDict2 = xDict; int key; int expr_8F = key = attrs.attrs.get_Item(i); long num2 = xDict2[key]; expr_80[expr_8F] = num2 + (long)attrs.values.get_Item(i); } else { xDict.Add(attrs.attrs.get_Item(i), (long)attrs.values.get_Item(i)); } } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(AttrUtility.GetDesc(xDict.Keys.get_Item(0), xDict.Values.get_Item(0), " +", "fffae6", "f95f4f", false)); for (int j = 1; j < xDict.Count; j++) { stringBuilder.Append("\n"); stringBuilder.Append(AttrUtility.GetDesc(xDict.Keys.get_Item(j), xDict.Values.get_Item(j), " +", "fffae6", "f95f4f", false)); } return(stringBuilder.ToString()); }
public static string GetStandardAddDesc(AttrType type, int value, string typeColor, string valueColor) { return(AttrUtility.GetDesc(type, value, " +", typeColor, valueColor, false)); }
public static string GetStandardAddDesc(int typeNum, long value, string valueColor, int blankNum) { return(AttrUtility.GetDesc((AttrType)typeNum, value, ((blankNum <= 0) ? string.Empty : new string(' ', blankNum)) + "+", string.Empty, valueColor, false)); }
public static string GetStandardAddDesc(int typeNum, long value, string valueColor) { return(AttrUtility.GetDesc((AttrType)typeNum, value, " +", string.Empty, valueColor, false)); }
public static string GetStandardAddDesc(AttrType type, long value) { return(AttrUtility.GetDesc(type, value, " +", string.Empty, string.Empty, false)); }
public static string GetStandardDesc(int typeNum, long value, string typeColor, string valueColor, int blankNum) { return(AttrUtility.GetDesc((AttrType)typeNum, value, ":" + ((blankNum <= 0) ? string.Empty : new string(' ', blankNum)), typeColor, valueColor, true)); }
public static string GetStandardDesc(int typeNum, long value, string typeColor, string valueColor) { return(AttrUtility.GetDesc((AttrType)typeNum, value, ": ", typeColor, valueColor, true)); }
public static string GetStandardDesc(AttrType type, int value, string valueColor, int blankNum) { return(AttrUtility.GetDesc(type, value, ":" + ((blankNum <= 0) ? string.Empty : new string(' ', blankNum)), string.Empty, valueColor, true)); }
public static string GetStandardDesc(AttrType type, long value, string valueColor) { return(AttrUtility.GetDesc(type, value, ": ", string.Empty, valueColor, true)); }
public static string GetStandardDesc(int typeNum, long value) { return(AttrUtility.GetDesc((AttrType)typeNum, value, ": ", string.Empty, string.Empty, true)); }
public static string GetStandardDesc(AttrType type, int value) { return(AttrUtility.GetDesc(type, value, ": ", string.Empty, string.Empty, true)); }
public static string GetDesc(int typeNum, long value, string hyphen, string typeColor, string valueColor, bool isHyphenAccordWithType) { return(AttrUtility.GetDesc((AttrType)typeNum, value, hyphen, typeColor, valueColor, isHyphenAccordWithType)); }
public static string GetStandardAddDesc(AttrType type, int value, string typeColor, string valueColor, int blankNum) { return(AttrUtility.GetDesc(type, value, ((blankNum <= 0) ? string.Empty : new string(' ', blankNum)) + "+", typeColor, valueColor, false)); }
protected string GetAllFashionAttr() { if (this.fashionImformation.Count == 0) { return(string.Empty); } List <int> list = new List <int>(); for (int i = 0; i < this.fashionImformation.Values.get_Count(); i++) { if (this.fashionImformation.Values.get_Item(i).isAddAttr) { if (this.fashionImformation.Values.get_Item(i).state == FashionData.FashionDataState.Dressing || this.fashionImformation.Values.get_Item(i).state == FashionData.FashionDataState.Own) { if (DataReader <ShiZhuangXiTong> .Contains(this.fashionImformation.Values.get_Item(i).dataID)) { ShiZhuangXiTong shiZhuangXiTong = DataReader <ShiZhuangXiTong> .Get(this.fashionImformation.Values.get_Item(i).dataID); list.Add(shiZhuangXiTong.gainProperty); } } } } if (list.get_Count() == 0) { return(string.Empty); } XDict <int, long> xDict = new XDict <int, long>(); for (int j = 0; j < list.get_Count(); j++) { if (DataReader <Attrs> .Contains(list.get_Item(j))) { Attrs attrs = DataReader <Attrs> .Get(list.get_Item(j)); int num = (attrs.attrs.get_Count() >= attrs.values.get_Count()) ? attrs.values.get_Count() : attrs.attrs.get_Count(); if (num != 0) { for (int k = 0; k < num; k++) { if (xDict.ContainsKey(attrs.attrs.get_Item(k))) { XDict <int, long> xDict2; XDict <int, long> expr_196 = xDict2 = xDict; int key; int expr_1A7 = key = attrs.attrs.get_Item(k); long num2 = xDict2[key]; expr_196[expr_1A7] = num2 + (long)attrs.values.get_Item(k); } else { xDict.Add(attrs.attrs.get_Item(k), (long)attrs.values.get_Item(k)); } } } } } if (xDict.Count == 0) { return(string.Empty); } if (xDict.Count == 1) { return(AttrUtility.GetDesc(xDict.Keys.get_Item(0), xDict.Values.get_Item(0), " +", "fffae6", "f95f4f", false)); } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(AttrUtility.GetDesc(xDict.Keys.get_Item(0), xDict.Values.get_Item(0), " +", "fffae6", "f95f4f", false)); for (int l = 1; l < xDict.Count; l++) { stringBuilder.Append("\n"); stringBuilder.Append(AttrUtility.GetDesc(xDict.Keys.get_Item(l), xDict.Values.get_Item(l), " +", "fffae6", "f95f4f", false)); } return(stringBuilder.ToString()); }