Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Vezerlofo vzf = new Vezerlofo();

            vzf.StartPosition = this.StartPosition;
            vzf.Show();
            this.Hide();
        }
        private async void button1_Click(object sender, EventArgs e)
        {
            if (button1.Text != "tovább")
            {
                button1.Enabled = false;

                //memória betöltése
                int memorytotal = memoria();
                mcsc.Properties.Settings.Default.memoria = memorytotal;
                mcsc.Properties.Settings.Default.rfs     = memorytotal / 2;
                mcsc.Properties.Settings.Default.Save();
                //ping betöltése
                int ping = pngmenny();
                //minden egyéb betöltése
                betoltminden(memorytotal, ping);
            }
            else
            {
                /*MessageBoxButtons buttons = MessageBoxButtons.YesNo;
                 * DialogResult result = MessageBox.Show("Ön most belép a vezrlépultba. Szertné, hogy elinduljon a memória, a processszor és a ping mérése?(A szerver indításánál automatikusan elindul)",
                 *  "Figyelem!", buttons, MessageBoxIcon.Warning);
                 * if (result == DialogResult.Yes)
                 * {
                 *  mcsc.Properties.Settings.Default.meres = true;
                 *  mcsc.Properties.Settings.Default.Save();
                 * }
                 * else
                 * {
                 *  mcsc.Properties.Settings.Default.meres = false;
                 *  mcsc.Properties.Settings.Default.Save();
                 * }
                 * await PutTaskDelay();*/

                mcsc.Properties.Settings.Default.ferohely    = int.Parse(jatekossszam.Text);
                mcsc.Properties.Settings.Default.srv_created = true;
                mcsc.Properties.Settings.Default.Save();
                Vezerlofo vzf = new Vezerlofo();
                vzf.StartPosition = this.StartPosition;
                vzf.Show();
                this.Close();
            }
        }