示例#1
0
        private void btnReturnToMain_Click(object sender, EventArgs e)
        {
            formMain Main = new formMain();

            Main.Visible = true;
            formGame Game = this;

            Game.Close();
        }
示例#2
0
        private void btnStartGame_Click(object sender, EventArgs e)
        {
            formGame Game = new formGame();

            Game.Show();
            formMain Main = this;

            Main.Hide();
            pbLogo.Image.Dispose();
        }
示例#3
0
        public void saveFunction(string fileName)
        {
            formGame Game = new formGame();

            Game.Owner     = this;
            string[,] Data = new string[2, 2];
            Data[0, 0]     = "Текущий день";
            Data[0, 1]     = Game.dayNumber.ToString();
            Data[1, 0]     = "Текущее событие";
            Data[1, 1]     = Game.eventNumber.ToString();
            if (File.Exists(fileName))
            {
                File.Create(fileName);
                for (int i = 0; i <= Data.Length; i++)
                {
                    File.WriteAllText(fileName, Data[i, 0] + " - " + Data[i, 1]);
                }
            }
        }