private void btnFilterHands_Click(object sender, EventArgs e)
        {
            frmFilterHands frmfilterhands = new frmFilterHands();

            frmfilterhands.txtFilterHands.Text = this.txtFilteredHands.Text;
            frmfilterhands.FillButtons();
            frmfilterhands.ShowDialog();
            this.txtFilteredHands.Text = frmfilterhands.txtFilterHands.Text;

            List <HandView> listHandView   = new List <HandView>();
            HandView        handViewGetter = new HandView();

            listHandView = handViewGetter.GetHandsByIDSession(this.IDSession, Convert.ToInt32(cboPlayer.SelectedValue), Convert.ToInt32(this.txtPage.Text), this.txtFilteredHands.Text);

            this.dataGridView1.Rows.Clear();
            int counter = 0;

            foreach (HandView handView in listHandView)
            {
                this.dataGridView1.Rows.Add(handView.IDHand.ToString(),
                                            new Bitmap(Image.FromFile(@"Images\" + handView.CardOne + ".jpg"), 60, 80),
                                            new Bitmap(Image.FromFile(@"Images\" + handView.CardTwo + ".jpg"), 60, 80),
                                            handView.NetWon);
                this.dataGridView1.Rows[counter].Height = 80;
                counter++;
            }

            this.txtMaxPages.Text    = handViewGetter.GetMaxPagesSession(Convert.ToInt32(cboPlayer.SelectedValue)).ToString();
            this.txtPage.Text        = "1";
            this.btnFirst.Enabled    = false;
            this.btnPrevious.Enabled = false;
            this.btnNext.Enabled     = (Convert.ToInt32(this.txtMaxPages.Text) > 1);
            this.btnLast.Enabled     = this.btnNext.Enabled;
        }
Exemple #2
0
        private void btnFilterHands_Click(object sender, EventArgs e)
        {
            frmFilterHands frmfilterhands = new frmFilterHands();

            frmfilterhands.txtFilterHands.Text = this.txtFilteredHands.Text;
            frmfilterhands.FillButtons();
            frmfilterhands.ShowDialog();
            this.txtFilteredHands.Text = frmfilterhands.txtFilterHands.Text;

            FilterResults();
        }