Public Class frmCheat

    Sub ClearTextBoxesAndIncreaseCheaterCount()
        'Clear text boxes After Sucess.
        txtFirstAnswer.Text = ""
        txtSecondAnswer.Text = ""
        'Increase CheaterCount which shows 'Cheater' in level label if it reachs the set number.
        frmMain.CheaterCount += 1
    End Sub

    Private Sub frmCheat_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        If frmMain.lang = "KOR" Then
            Me.Text = "주식 전쟁 치트"
            btnOK.Text = "확인"
        End If
    End Sub

    Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
        'Cheat01: Increase 100 Money
        If txtFirstAnswer.Text = "GREATJ" And txtSecondAnswer.Text = "UYOUNG" Then
            'Increase Money
            frmMain.MyWallet = frmMain.MyWallet + 100000
            If frmMain.lang = "ENG" Then
                'Update label which displays current having money.
                frmMain.lblMoney.Text = frmMain.MyWallet.ToString("C")
                'Increase CheaterCount which shows 'Cheater' in level label if it reachs the set number.
                frmMain.CheaterCount += 1
                'Show messagebox
                MsgBox("Success. You picked up $100,000 on the street.", vbExclamation, "Stock War Cheat")
            ElseIf frmMain.lang = "KOR" Then
                frmMain.lblMoney.Text = frmMain.MyWallet.ToString("￦##,##.##K")
                'Show messagebox
                MsgBox("성공. 당신은 거리에서 일천 만원이 든 지갑을 주웠습니다.", vbExclamation, "주식 전쟁 치트")
            End If
            ClearTextBoxesAndIncreaseCheaterCount()

            'Cheat02: Decrease tax half
        ElseIf txtFirstAnswer.Text = "IHATEH" And txtSecondAnswer.Text = "IGHTAX" Then
            frmMain.intTax = frmMain.intTax * 0.935
            If frmMain.lang = "ENG" Then
                MsgBox("Success. You hacked into National Tax Service system. (6.5% reduction in tax from next month.)", vbExclamation, "Stock War Cheat")
            ElseIf frmMain.lang = "KOR" Then
                MsgBox("성공. 당신은 국세청 전산망을 해킹했습니다. (다음 달부터 6.5% 절감된 세금만 내게 됩니다.)", vbExclamation, "주식 전쟁 치트")
            End If
            ClearTextBoxesAndIncreaseCheaterCount()

            'Cheat03: Make salary double
        ElseIf txtFirstAnswer.Text = "IAMPRO" And txtSecondAnswer.Text = "MOTEDX" Then
            frmMain.intSalary = frmMain.intSalary * 1.25
            If frmMain.lang = "ENG" Then
                MsgBox("Success. You have been promoted in your job. (From next month, you salary has increased 25%.)", vbExclamation, "Stock War Cheat")
            ElseIf frmMain.lang = "KOR" Then
                MsgBox("성공. 당신은 승진했습니다. (다음 달부터 25% 상승된 월급을 받게 됩니다.)", vbExclamation, "주식 전쟁 치트")
            End If
            ClearTextBoxesAndIncreaseCheaterCount()

            'Cheat04: SamSung vs. Apple
        ElseIf txtFirstAnswer.Text = "SAMSUN" And txtSecondAnswer.Text = "GAPPLE" Then
            frmMain.SamsungAppleSue += 1
            If frmMain.lang = "ENG" Then
                MsgBox("Success. Apple and Samsung have started suing to each other. (Their reputations have been decreased 0.15%.)", vbExclamation, "Stock War Cheat")
            ElseIf frmMain.lang = "KOR" Then
                MsgBox("성공. Apple과 Samsung이 소송전을 펼칩니다. (두 기업의 평판이 0.15% 하락합니다.)", vbExclamation, "주식 전쟁 치트")
            End If
            ClearTextBoxesAndIncreaseCheaterCount()

            'Cheat05: Tsunami in Japan
        ElseIf txtFirstAnswer.Text = "TSUNAM" And txtSecondAnswer.Text = "IINJPN" Then
            frmMain.TsunamiJapan += 1
            If frmMain.lang = "ENG" Then
                MsgBox("Success, but that is not good. In Japan, Tsunami destroyed factories of Japan companies. (Productions of all Japanese Companies have been decreased 2%.)", vbExclamation, "Stock War Cheat")
            ElseIf frmMain.lang = "KOR" Then
                MsgBox("성공, 그러나 좋지 않음. 일본에서 지진해일이 일본기업들의 공장을 파괴했습니다. (모든 일본기업의 생산성이 2% 하락합니다.)", vbExclamation, "주식 전쟁 치트")
            End If
            ClearTextBoxesAndIncreaseCheaterCount()

            'Cheat06: Fastfood Boom
        ElseIf txtFirstAnswer.Text = "FASTFO" And txtSecondAnswer.Text = "ODBOOM" Then
            frmMain.FastfoodBoom += 1
            If frmMain.lang = "ENG" Then
                MsgBox("Success. People go to fast-food restaurants everyday. (Incomes of all companies related to fast-food have increased 1.5%.)", vbExclamation, "Stock War Cheat")
            ElseIf frmMain.lang = "KOR" Then
                MsgBox("성공. 사람들은 평소보다 패스트푸드점을 두배로 이용합니다. (패스트푸드와 관련된 모든 기업의 수입 2배로 상승합니다.)", vbExclamation, "주식 전쟁 치트")
            End If
            ClearTextBoxesAndIncreaseCheaterCount()

            'Cheat07: Information Age
        ElseIf txtFirstAnswer.Text = "INFOAG" And txtSecondAnswer.Text = "EFFECT" Then
            frmMain.InfoAgeEffect += 1
            If frmMain.lang = "ENG" Then
                MsgBox("Success. Everyone around the world would be able to use the internet anywhere and anytime. (Values of all companies related to information technology have increased 1.5%.)", vbExclamation, "Stock War Cheat")
            ElseIf frmMain.lang = "KOR" Then
                MsgBox("성공. 전세계 모든 사람들이 언제 어디서나 인터넷을 이용할 수 있게 되었습니다. (웹서비스와 관련된 모든 기업의 가치가 1.5% 상승합니다.", vbExclamation, "주식 전쟁 치트")
            End If
            ClearTextBoxesAndIncreaseCheaterCount()

            'Cheat08: Find another lives from another planet
        ElseIf txtFirstAnswer.Text = "IMETAL" And txtSecondAnswer.Text = "IENWOW" Then
            frmMain.MeetAlien += 1
            If frmMain.lang = "ENG" Then
                MsgBox("Success. Other lives have been discovered on other planet. (Values of all companies related to the universe have been increased 1.5%.", vbExclamation, "Stock War Cheat")
            ElseIf frmMain.lang = "KOR" Then
                MsgBox("성공. 다른 행성에서 다른 생명체가 발견되었습니다. (우주와 관련된 모든 기업들의 가치가 1.5% 상승합니다.)", vbExclamation, "주식 전쟁 치트")
            End If
            ClearTextBoxesAndIncreaseCheaterCount()


        Else
            If frmMain.lang = "ENG" Then
                MsgBox("Oops, that does not work. Make sure you type it correctly.", vbCritical, "Stock War Cheat")
            ElseIf frmMain.lang = "KOR" Then
                MsgBox("이런, 틀린 코드입니다. 제대로 입력했는지 확인하세요.", vbCritical, "주식 전쟁 치트")
            End If
        End If




    End Sub

End Class