public void DrawGameListPanelControls(int pageNumber) { gamesListPanel.Controls.Clear(); for (int i = gamesPerPage * pageNumber; i < (gamesPerPage * pageNumber) + gamesPerPage; i++) { if (i < gamesToBeDisplayed.Count) { gamesListPanel.Controls.Add(ControlsGenerator.GenerateGamePanel(gamesToBeDisplayed[i])); } } if (pageNumber > 0) { Button back = ControlsGenerator.GenerateBtn("<< BACK"); back.Click += Nav_Click; back.Tag = pageNumber - 1; gamesListPanel.Controls.Add(back); } if (gamesToBeDisplayed.Count > gamesPerPage * (pageNumber + 1)) { Button next = ControlsGenerator.GenerateBtn("NEXT >>"); next.Click += Nav_Click; next.Tag = pageNumber + 1; gamesListPanel.Controls.Add(next); } }
public void PopulateGenreList(GenreContainer genre) { foreach (Games game in genre.GetContainer()) { gamesListPanel.Controls.Add(ControlsGenerator.GenerateGamePanel(game)); } }
public void PopulateGenreSelector(List <GenreContainer> genrelist) { foreach (GenreContainer g in genrelist) { CheckBox c = ControlsGenerator.GenerateGenreSelectCheckbox(g, GenreCheckEventHandler); allGenreCheckbox.Add(c); genreSelectorPanel.Controls.Add(c); } }
public void PopulateGameCart() { cartListPanel.Controls.Clear(); foreach (Games game in GetContainer()) { Panel p = ControlsGenerator.GenerateCartPanel(game); ((LinkLabel)p.Controls.Find("remove", true)[0]).Click += Remove_Click; cartListPanel.Controls.Add(p); } UpdateSubtotal(); }
public void GenerateReceipt() { this.flowLayoutPanel2.Controls.Clear(); double total = 0; string gamestring = ""; label11.Text = currentLoggedInUser.Username; label13.Text = currentLoggedInUser.Username; label14.Text = currentLoggedInUser.Email; cart.GetContainer(); foreach (Games game in cart.GetContainer()) { total += game.Cost; this.flowLayoutPanel2.Controls.Add(ControlsGenerator.GenerateRecepitPanel(game)); } label15.Text = total.ToString("0.00"); label16.Text = store.paymentMethod; label17.Text = DateTime.Now.ToString("dd MMMM yyyy"); label18.Text = RandomGenerator.GenerateRandomDigits(16); label19.Text = gamestring; label25.Text = "S" + String.Format("{0:C}", total); }
private void DisplayLoginError() { flowLayoutPanel2.Controls.Clear(); flowLayoutPanel2.Controls.Add(ControlsGenerator.GenerateLoginError()); textBox2.Clear(); }