예제 #1
0
        private void HighScores_Load(object sender, EventArgs e)
        {
            welcomeForm = this.Owner as WelcomeForm;
            string readText = File.ReadAllText("H:\\2020\\Sem2\\Object Orintated ITPR5.518\\WindowsForms\\MemoryGame\\Scores.txt");

            string[] scores = readText.Split('\n');

            highScoreText1.Text = readText;
            TextBox[] boxes = new TextBox[] { highScoreText1, highScoreText2, highScoreText3, highScoreText4, highScoreText5, highScoreText6, highScoreText7, highScoreText8, highScoreText9, highScoreText10 };

            int index = 0;

            foreach (TextBox textBox in boxes)
            {
                textBox.Text = scores[index];
                index++;
            }
        }
예제 #2
0
 private void GameForm_Load(object sender, EventArgs e)
 {
     welcomeForm = this.Owner as WelcomeForm;
 }