Esempio n. 1
0
        public TournamentViewer(Tournament j, User i)
        {
            t  = j;
            me = i;
            InitializeComponent();

            label1.Text = t.GetName();
            label2.Text = t.GetGame();
            switch (t.GetStyle())
            {
            case 0:
                label3.Text = "Double Elimination";
                break;

            case 1:
                label3.Text = "Single Elimination";
                break;

            case 2:
                label3.Text = "Round Robin";
                break;
            }
            label4.Text = t.GetDate().ToString();
            label5.Text = t.GetLocation();
            label6.Text = t.GetEntryFee().ToString();
            label7.Text = t.GetMaxEntrants().ToString();
            label8.Text = t.GetTotalEntrants().ToString();
            if (t.GetEntrants().Exists(x => x.GetUserID().Equals(me.ID)))
            {
                textBox1.Text = t.GetEntrants().Find(x => x.GetUserID().Equals(me.ID)).GetTag();
                Register.Text = "Unregister";
            }
            UpdateDisplayEntrants();
            this.Show();
        }
Esempio n. 2
0
 private void RefreshButton_Click(object sender, EventArgs e)
 {
     label8.Text = t.GetTotalEntrants().ToString();
     UpdateDisplayEntrants();
 }