Exemplo n.º 1
0
        /// <summary>
        /// Dit start de changename menu op.
        /// </summary>
        private void ChangeNameButton_Click(object sender, EventArgs e)
        {
            Close();
            playername newMDIChild = new playername(); // Start de Playername form op, om vanaf het hoofdmenu de player name te veranderen.

            newMDIChild.MdiParent = Form.ActiveForm;   // Set the Parent Form of the Child window.
            newMDIChild.Show();                        // Display the new form.
        }
Exemplo n.º 2
0
        /// <summary>
        /// maaakt alle variable die nodig zijn voor de speler, indien dit er al is gaat hij door naar het menu en worden deze geladen.
        /// </summary>
        private void LoadMainMenu()
        {
            string currency;
            int    Icurrency;

            if (Directory.Exists(SavingClass.path))
            {
                string[] name = System.IO.File.ReadAllLines(SavingClass.path + "PlayerName.sav");
                SavingClass.varplayername = name[0];

                string[] lines = System.IO.File.ReadAllLines(SavingClass.path + "memory" + SavingClass.varplayername + ".sav");
                currency  = lines[1];
                Icurrency = Convert.ToInt32(currency);
                SavingClass.varCurrency         = Icurrency;
                SavingClass.varCardBack         = lines[2];
                SavingClass.varHardmode         = lines[3];
                SavingClass.varOWbought         = lines[6];
                SavingClass.varAchievement1Have = lines[7];
                SavingClass.varAchievement2Have = lines[8];
                SavingClass.varAchievement3Have = lines[9];
                SavingClass.varRewardsClaimed   = lines[10];

                Store.invoer = SavingClass.varCardBack;


                Menu newMDIChild = new Menu(); //Start het menu spel op.
                // Set the Parent Form of the Child window.
                newMDIChild.MdiParent = ActiveForm;
                // Display the new form.
                newMDIChild.Show();
            }
            else
            {
                playername newMDIChild = new playername(); //Start de playername  op.
                newMDIChild.MdiParent = ActiveForm;
                // Set the Parent Form of the Child window.
                newMDIChild.MdiParent = Form.ActiveForm;
                // Display the new form.
                newMDIChild.Show();
            }
        }