/// <summary> /// Updates the main window tables /// </summary> public void Updater() { AllMarketRequest MarketRequestsTemp = market.QueryAllMarketRequest(); UserData = market.SendQueryUserRequest(); MarketUserRequests MarketDataTemp = market.QueryUserRequests(); MarketData1 = new ObservableCollection <MarketData>(); MarketRequests1 = new ObservableCollection <MarketRequests>(); foreach (AllDataRequest item in MarketDataTemp.Requests) { MarketRequests1.Add(new MarketRequests { Id = item.Id, Type = item.Request.Type, Commodity = item.Request.Commodity, Amount = item.Request.Amount, Price = item.Request.Price }); } foreach (ItemAskBid item in MarketRequestsTemp.MarketInfo) { MarketData1.Add(new MarketData { Id = item.Id, Ask = item.Info.Ask, Bid = item.Info.Bid, }); } History = HistoryLogger.ReadHistory(); foreach (Record rec in History) { rec.IsExecuted = !UserData.Requests.Contains(rec.RequestId); } History = new ObservableCollection <Record>(History.OrderByDescending(a => a.Time)); UpdateItemSources(); }