コード例 #1
0
        private void replayButton_Click(object sender, EventArgs e)
        {
            //Move to game screen
            mainScreen ms = new mainScreen();
            Form       f  = this.FindForm();

            //Remove Main Screen
            f.Controls.Remove(this);

            f.Controls.Add(ms);
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: NPatton444/Simon-Says
        public Form1()
        {
            //Create High Score File
            if (!File.Exists(filePath))
            {
                File.Create(filePath);
            }
            else
            {
                string[] lines    = File.ReadAllLines(filePath);
                string[] newLines = new string[lines.Count() + 1];
                foreach (var s in lines)
                {
                }
            }

            InitializeComponent();

            //Go to main Screen
            mainScreen ms = new mainScreen();

            this.Controls.Add(ms);
        }