public void TranslateWMOrderEx(WMInfoEx info, string searchword) { info.info.enName = info.orders.First().itemName; info.info.zhName = searchwordTranslator["Item"].Translate(searchword); foreach (var order in info.orders) { switch (order.order_Type) { case "buy": order.order_Type = "收购"; break; case "sell": order.order_Type = "出售"; break; } switch (order.status) { case "ingame": order.status = "游戏内在线"; break; case "online": order.status = "WM在线"; break; case "offline": order.status = "离线"; break; } } }
public void OrderWMInfoEx(WMInfoEx info) { info.orders = info.orders .Where(order => order.order_Type == "sell") .Where(order => order.status == "online" || order.status == "ingame") .OrderBy(order => order.platinum) .Take(3) .ToArray(); }
public void OrderWMInfoEx(WMInfoEx info) { info.orders = info.orders .Where(order => order.order_Type == "sell") .Where(order => order.status == "online" || order.status == "ingame") .OrderBy(order => order.platinum) .Take(Config.Instance.WMSearchCount) .ToArray(); }
public void OrderWMInfoEx(WMInfoEx info, bool isbuyer) { info.orders = (isbuyer ? info.orders .Where(order => order.order_Type == (isbuyer ? "buy" : "sell")) .Where(order => order.status == "online" || order.status == "ingame") .OrderByDescending(order => order.platinum) : info.orders .Where(order => order.order_Type == (isbuyer ? "buy" : "sell")) .Where(order => order.status == "online" || order.status == "ingame") .OrderBy(order => order.platinum)) .Take(Config.Instance.WMSearchCount) .ToArray(); }
public static string ToString(WMInfoEx info) { var sb = new StringBuilder(); var item = info.info; sb.AppendLine($"下面是物品: {item.zhName} 按价格从小到大的{info.orders.Length}条信息"); sb.AppendLine(); foreach (var order in info.orders) { sb.AppendLine($"[{order.userName}] {order.status}"); sb.AppendLine($"{order.order_Type} {order.platinum} 白鸡"); sb.AppendLine( $"- 快捷回复: /w {order.userName} Hi! I want to buy: {item.enName} for {order.platinum} platinum. (warframe.market)"); sb.AppendLine(); } // 这已经很难看了好吧 return(sb.ToString().Trim()); }
public static string ToString(WMInfoEx info, bool withQR, bool isbuyer) { var sb = new StringBuilder(); var item = info.info; sb.AppendLine($"下面是物品: {item.zhName} 按价格{(isbuyer ? "从大到小" : "从小到大")}的{info.orders.Length}条{(isbuyer ? "买家" : "卖家")}信息"); sb.AppendLine(); foreach (var order in info.orders) { sb.AppendLine($"{order.order_Type} {order.platinum} 白鸡 [{order.userName}] {order.status}"); if (withQR) { sb.AppendLine( $"- 快捷回复: /w {order.userName} Hi! I want to {(isbuyer ? "sell" : "buy")}: {item.enName} for {order.platinum} platinum. (warframe.market)"); } } // 这已经很难看了好吧 return(sb.ToString().Trim()); }