Пример #1
0
        private void CreatorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DeleteItems();

            StreamReader fail    = new StreamReader("Maker.txt");
            string       creator = File.ReadAllText("Maker.txt");

            fail.Close();

            PlayRules = new GuessesMan(creator);
            main_window.Controls.Add(PlayRules);
            if (PlayRules != null)
            {
                PlayRules.Width  = main_window.Width;
                PlayRules.Height = main_window.Height;
                PlayRules.SizeChange();
            }
        }
Пример #2
0
        private void RuleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // удаляем формун
            DeleteItems();

            StreamReader fail      = new StreamReader("Regulation.txt");
            string       principle = File.ReadAllText("Regulation.txt");

            fail.Close();

            //открываем форму
            PlayRules = new GuessesMan(principle);
            main_window.Controls.Add(PlayRules);
            if (PlayRules != null)
            {
                PlayRules.Width  = main_window.Width;
                PlayRules.Height = main_window.Height;
                PlayRules.SizeChange();
            }
        }