private void SendStructToUI(DataStructure structureToBeParsed) { List <ItemsStructure> items = new List <ItemsStructure>(); TradeDetails detailsToSend = new TradeDetails(); items = structureToBeParsed.LeftItems; foreach (ItemsStructure singleItem in items) { detailsToSend = new TradeDetails(); detailsToSend = SingleRowToSend(singleItem, structureToBeParsed); MainWindow.main.TradersQueue.Enqueue(detailsToSend); } detailsToSend = new TradeDetails(); detailsToSend = SingleRowToSend(""); MainWindow.main.TradersQueue.Enqueue(detailsToSend); items = structureToBeParsed.RightItems; detailsToSend = new TradeDetails(); foreach (ItemsStructure singleItem in items) { detailsToSend = new TradeDetails(); detailsToSend = SingleRowToSend(singleItem, structureToBeParsed); MainWindow.main.TradersQueue.Enqueue(detailsToSend); } detailsToSend = new TradeDetails(); detailsToSend = SingleRowToSend(" "); MainWindow.main.TradersQueue.Enqueue(detailsToSend); detailsToSend = new TradeDetails(); detailsToSend = SingleRowToSend(" "); MainWindow.main.TradersQueue.Enqueue(detailsToSend); }
private TradeDetails SingleRowToSend(ItemsStructure row, DataStructure structureToBeParsed) { TradeDetails detailsToSend = new TradeDetails(); detailsToSend = new TradeDetails(); detailsToSend.ItemLink = row.ItemLink; detailsToSend.ItemName = row.ItemName; detailsToSend.ItemPrice = row.ItemPrice.ToString(); detailsToSend.TradeLink = "https://csgolounge.com/" + structureToBeParsed.Tradelink; return(detailsToSend); }
private TradeDetails SingleRowToSend(string container) { TradeDetails detailsToSend = new TradeDetails(); detailsToSend = new TradeDetails(); detailsToSend.ItemLink = container; detailsToSend.ItemName = container; detailsToSend.ItemPrice = container; detailsToSend.TradeLink = container; return(detailsToSend); }