// Gets the button type, number of runs and if runs are off the bat. Calls button handler to update scores.
        private void General_Button_Click(string buttonTypeClicked,bool batUsed, int runs)
        {
            Create_Undo_Point();

            ButtonHandler button = new ButtonHandler();
            button.GeneralButtonClickHandler(BatList, BowlList, InningsList, OverAnalysisList, FallOfWicketList, Innings_Id, folderName, buttonTypeClicked, batUsed, runs);

            if (((buttonTypeClicked == "wide" || buttonTypeClicked == "noBall") && (runs % 2 == 0)) || ((buttonTypeClicked == "legBye" || buttonTypeClicked == "bye" || buttonTypeClicked == "runs") && (runs % 2 == 1)))
            {
                Swap_Batsman();
            }
            // Check if delivery was last in the over
            if (buttonTypeClicked == "runs" || buttonTypeClicked == "bye" || buttonTypeClicked == "legBye" || buttonTypeClicked == "penalty")
            {
                End_OF_Over_Check();
            }
            //Update tables and hide all flow panels
            Update_Score();
            HideAllPanels();
            // Check end of innings.
            Innings innings = new Innings();
            if (innings.Check_End_Of_Innings(Innings_Id, InningsList))
            {
                End_Of_Innings();
            }
        }