Public Class frm_scorecontrol

    Dim TAKEONE As match
    Dim START_BUTTON As Boolean = False

    Private Sub tmr_display_Tick(sender As Object, e As EventArgs) Handles tmr_display.Tick

        If START_BUTTON = True Then

            ' Board Display
            lbl_time.Text = TAKEONE.RoundTime.Time
            lbl_round.Text = TAKEONE.Round
            lbl_match_number.Text = "EXHIB"
            lbl_weight_class.Text = "OPEN"

            ' Blue Fighter Data Display
            lbl_blue_score.Text = TAKEONE.Blue.Points.Score.ToString("00")
            lbl_blue_kfaul.Text = TAKEONE.Blue.Points.KFaul.ToString("00")
            lbl_blue_gfaul.Text = TAKEONE.Blue.Points.GFaul.ToString("00")
            lbl_blue_team.Text = TAKEONE.Blue.Team
            lbl_blue_fighter_name.Text = TAKEONE.Blue.Name
            'pb_blue_flag.Image = Image.FromStream(TAKEONE.Blue.Flag)

            ' Red Fighter Data Display
            lbl_red_score.Text = TAKEONE.Red.Points.Score.ToString("00")
            lbl_red_kfaul.Text = TAKEONE.Red.Points.KFaul.ToString("00")
            lbl_red_gfaul.Text = TAKEONE.Red.Points.GFaul.ToString("00")
            lbl_red_team.Text = TAKEONE.Red.Team
            lbl_red_fighter_name.Text = TAKEONE.Red.Name
            'pb_red_flag.Image = Image.FromStream(TAKEONE.red.Flag)

        End If

    End Sub

    Private Sub btn_start_Click(sender As Object, e As EventArgs) Handles btn_start.Click

        If btn_start.Text = "START" Then

            TAKEONE = New match(1, 2, 3, 2, 0, 1, 0, True)
            START_BUTTON = True
            round_countdown.Interval = 1000
            round_countdown.Enabled = True
            btn_start.Text = "PAUSE"

        ElseIf btn_start.Text = "PAUSE" Then

            btn_start.Text = "RESUME"
            round_countdown.Enabled = False

        ElseIf btn_start.Text = "RESUME" Then

            btn_start.Text = "PAUSE"
            round_countdown.Enabled = True

        End If

    End Sub

    Private Sub btn_blue_shkp_Click(sender As Object, e As EventArgs) Handles btn_blue_shkp.Click

        TAKEONE.Blue.Points.ADJ_SCORE(4)

    End Sub

    Private Sub btn_blue_dhkp_Click(sender As Object, e As EventArgs) Handles btn_blue_dhkp.Click

        TAKEONE.Blue.Points.ADJ_SCORE(3)

    End Sub

    Private Sub btn_blue_sbkp_Click(sender As Object, e As EventArgs) Handles btn_blue_sbkp.Click

        TAKEONE.Blue.Points.ADJ_SCORE(3)

    End Sub

    Private Sub btn_blue_dbkp_Click(sender As Object, e As EventArgs) Handles btn_blue_dbkp.Click

        TAKEONE.Blue.Points.ADJ_SCORE(1)

    End Sub

    Private Sub Button14_Click(sender As Object, e As EventArgs) Handles Button14.Click

        TAKEONE.Red.Points.ADJ_SCORE(1)

    End Sub

    Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click

        TAKEONE.Red.Points.ADJ_SCORE(3)

    End Sub

    Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click

        TAKEONE.Red.Points.ADJ_SCORE(3)

    End Sub

    Private Sub Button16_Click(sender As Object, e As EventArgs) Handles Button16.Click

        TAKEONE.Red.Points.ADJ_SCORE(4)

    End Sub

    Private Sub timer_countdown_Tick(sender As Object, e As EventArgs) Handles round_countdown.Tick

        If TAKEONE.RoundTime.Status = False Then
            TAKEONE.RoundTime.CountDown()
        ElseIf TAKEONE.RoundTime.Status = True And TAKEONE.MaxRound < TAKEONE.Round Then
            btn_start.Text = "BEGIN"
            round_countdown.Enabled = False
        ElseIf TAKEONE.RoundTime.Status = True And TAKEONE.MaxRound = TAKEONE.Round Then
            btn_start.Text = "START"
            round_countdown.Enabled = False
        End If

    End Sub

    Private Sub btn_blue_shkn_Click(sender As Object, e As EventArgs) Handles btn_blue_shkn.Click

        TAKEONE.Blue.Points.ADJ_SCORE(-4)

    End Sub

    Private Sub btn_blue_dhkn_Click(sender As Object, e As EventArgs) Handles btn_blue_dhkn.Click

        TAKEONE.Blue.Points.ADJ_SCORE(-3)

    End Sub

    Private Sub btn_blue_sbkn_Click(sender As Object, e As EventArgs) Handles btn_blue_sbkn.Click

        TAKEONE.Blue.Points.ADJ_SCORE(-3)

    End Sub

    Private Sub btn_blue_dbkn_Click(sender As Object, e As EventArgs) Handles btn_blue_dbkn.Click

        TAKEONE.Blue.Points.ADJ_SCORE(-1)

    End Sub

    Private Sub btn_red_dbkn_Click(sender As Object, e As EventArgs) Handles btn_red_dbkn.Click

        TAKEONE.Red.Points.ADJ_SCORE(-1)

    End Sub

    Private Sub btn_red_sbkn_Click(sender As Object, e As EventArgs) Handles btn_red_sbkn.Click

        TAKEONE.Red.Points.ADJ_SCORE(-3)

    End Sub

    Private Sub btn_red_dhkn_Click(sender As Object, e As EventArgs) Handles btn_red_dhkn.Click

        TAKEONE.Red.Points.ADJ_SCORE(-3)

    End Sub

    Private Sub btn_red_shkn_Click(sender As Object, e As EventArgs) Handles btn_red_shkn.Click

        TAKEONE.Red.Points.ADJ_SCORE(-4)

    End Sub

    Private Sub btn_blue_pkf_Click(sender As Object, e As EventArgs) Handles btn_blue_pkf.Click

        TAKEONE.Blue.Points.ADJ_KFAUL(1)

    End Sub

    Private Sub btn_blue_nkf_Click(sender As Object, e As EventArgs) Handles btn_blue_nkf.Click

        TAKEONE.Blue.Points.ADJ_KFAUL(-1)

    End Sub

    Private Sub btn_blue_pgf_Click(sender As Object, e As EventArgs) Handles btn_blue_pgf.Click

        TAKEONE.Blue.Points.ADJ_GFAUL(1)

    End Sub

    Private Sub btn_blue_ngf_Click(sender As Object, e As EventArgs) Handles btn_blue_ngf.Click

        TAKEONE.Blue.Points.ADJ_GFAUL(-1)

    End Sub

    Private Sub btn_red_pkf_Click(sender As Object, e As EventArgs) Handles btn_red_pkf.Click

        TAKEONE.Red.Points.ADJ_KFAUL(1)

    End Sub

    Private Sub btn_red_nkf_Click(sender As Object, e As EventArgs) Handles btn_red_nkf.Click

        TAKEONE.Red.Points.ADJ_KFAUL(-1)

    End Sub

    Private Sub btn_red_pgf_Click(sender As Object, e As EventArgs) Handles btn_red_pgf.Click

        TAKEONE.Red.Points.ADJ_GFAUL(1)

    End Sub

    Private Sub btn_red_ngf_Click(sender As Object, e As EventArgs) Handles btn_red_ngf.Click

        TAKEONE.Red.Points.ADJ_GFAUL(-1)

    End Sub

    Private Sub btn_end_Click(sender As Object, e As EventArgs) Handles btn_end.Click

        btn_start.Text = "START"
        TAKEONE.RoundTime = New match.timer(TAKEONE.MaxRoundMin, TAKEONE.MaxRoundSec)
        round_countdown.Enabled = False

    End Sub


End Class
