Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public void PopulateGenreList(GenreContainer genre)
 {
     foreach (Games game in genre.GetContainer())
     {
         gamesListPanel.Controls.Add(ControlsGenerator.GenerateGamePanel(game));
     }
 }
Exemplo n.º 3
0
 public void PopulateGenreSelector(List <GenreContainer> genrelist)
 {
     foreach (GenreContainer g in genrelist)
     {
         CheckBox c = ControlsGenerator.GenerateGenreSelectCheckbox(g, GenreCheckEventHandler);
         allGenreCheckbox.Add(c);
         genreSelectorPanel.Controls.Add(c);
     }
 }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 private void DisplayLoginError()
 {
     flowLayoutPanel2.Controls.Clear();
     flowLayoutPanel2.Controls.Add(ControlsGenerator.GenerateLoginError());
     textBox2.Clear();
 }