コード例 #1
0
        // Tick speed of play button.
        private void buttonSpeed_Click(object sender, EventArgs e)
        {
            InputForm dlg = new InputForm();

            dlg.value           = 100;
            dlg.label1.Text     = "Input Tick Speed";
            dlg.label1.Location = new Point(dlg.Width / 2 - dlg.label1.Width / 2, 9);

            if (DialogResult.OK == dlg.ShowDialog())
            {
                GameSpeed = dlg.value;
                toolStripStatusLabelTickRate.Text = $"Tick Speed (ms) = {GameSpeed}";
            }
        }
コード例 #2
0
        private void buttonRandSeed_Click(object sender, EventArgs e)
        {
            InputForm dlg = new InputForm();

            dlg.label1.Text     = "Input Seed";
            dlg.label1.Location = new Point(dlg.Width / 2 - dlg.label1.Width / 2, 9);

            dlg.value         = Seed;
            dlg.textBox1.Text = Seed.ToString();

            if (DialogResult.OK == dlg.ShowDialog())
            {
                Seed = dlg.value;

                RandomizeGrid(Seed);
                toolStripStatusLabelSeed.Text = $"Seed = {Seed}";
            }
        }