예제 #1
0
        public Offer GetOffer(int id)
        {
            log.Trace($"Getting offer {id}");
            var offer = Offers.FirstOrDefault(e => e.Id == id);

            return(offer == null?OutgoingOffers.FirstOrDefault(e => e.Id == id) : offer);
        }
예제 #2
0
        private Offer GetActiveOffer()
        {
            log.Trace("Getting active offer");
            var offer = Offers.FirstOrDefault(o => o.TradeRequestSent);

            return(offer == null?OutgoingOffers.FirstOrDefault(o => o.TradeRequestSent) : offer);
        }
예제 #3
0
        private void OfferDeleted(int vmId)
        {
            var foundTicketOfferViewModel =
                Offers.FirstOrDefault(ticketOfferViewModel => ticketOfferViewModel.VmId == vmId);

            InvokeOnMainThread(() => Offers.Remove(foundTicketOfferViewModel));
        }