public void Update(ClientAuction listing) { Listing = listing; NameLabel.Text = Listing.Item.FriendlyName; PriceLabel.Text = Listing.Price.ToString("###,###,##0"); NameLabel.ForeColour = Listing.Item.IsAdded ? Color.Cyan : Color.White; if (Listing.Price > 10000000) //10Mil { PriceLabel.ForeColour = Color.Red; } else if (listing.Price > 1000000) //1Million { PriceLabel.ForeColour = Color.Orange; } else if (listing.Price > 100000) //1Million { PriceLabel.ForeColour = Color.Green; } else if (listing.Price > 10000) //1Million { PriceLabel.ForeColour = Color.DeepSkyBlue; } else { PriceLabel.ForeColour = Color.White; } SellerLabel.Text = Listing.Seller; if (UserMode) { switch (Listing.Seller) { case "Sold": SellerLabel.ForeColour = Color.Gold; break; case "Expired": SellerLabel.ForeColour = Color.Red; break; default: SellerLabel.ForeColour = Color.White; break; } } Visible = true; }
public void Update(ClientAuction listing) { Listing = listing; NameLabel.Text = Listing.Item.Name; PriceLabel.Text = Listing.Price.ToString("###,###,##0"); NameLabel.ForeColour = Listing.Item.IsAdded ? Color.Cyan : Color.White; if (Listing.Price > 10000000) //10Mil PriceLabel.ForeColour = Color.Red; else if (listing.Price > 1000000) //1Million PriceLabel.ForeColour = Color.Orange; else if (listing.Price > 100000) //1Million PriceLabel.ForeColour = Color.Green; else if (listing.Price > 10000) //1Million PriceLabel.ForeColour = Color.DeepSkyBlue; else PriceLabel.ForeColour = Color.White; SellerLabel.Text = Listing.Seller; if (UserMode) { switch (Listing.Seller) { case "Sold": SellerLabel.ForeColour = Color.Gold; break; case "Expired": SellerLabel.ForeColour = Color.Red; break; default: SellerLabel.ForeColour = Color.White; break; } } Visible = true; }