Exemplo n.º 1
0
 private void x8ToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     Restart();
     this.Size     = new Size(906, 1099);
     containerSize = 8;
     container     = new BlockContainer(containerSize, this);
     this.CenterToScreen();
     Properties.Settings.Default.gameSizeMode = 8;
     Properties.Settings.Default.Save();
 }
Exemplo n.º 2
0
 private void 데이터초기화ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.Size     = new Size(466, 659);
     containerSize = 4;
     container     = new BlockContainer(containerSize, this);
     this.CenterToScreen();
     Properties.Settings.Default.gameSizeMode = 4;
     multipleMode = 0;
     Properties.Settings.Default.gameMultipleMode = 0;
     Properties.Settings.Default.clearGame        = false;
     Properties.Settings.Default.bestScore        = 0;
     Properties.Settings.Default.Save();
     infinityMode = false;
     ((ToolStripMenuItem)무한모드ToolStripMenuItem).Checked = false;
     ((ToolStripMenuItem)무한모드ToolStripMenuItem).Enabled = false;
     Restart();
 }
Exemplo n.º 3
0
        public void Restart()
        {
            lockKey();
            container = new BlockContainer(containerSize, this);



            a = 0;
            panel1.BackColor  = Color.FromArgb(0, Color.White);
            button1.BackColor = Color.FromArgb(0, Color.White);
            label1.BackColor  = Color.Transparent;
            panel1.AutoSize   = false;
            panel1.Size       = this.Size;
            panel1.Visible    = false;
            panel1.Enabled    = false;
            score.score       = 0;
            Invalidate();
        }
Exemplo n.º 4
0
        public Main()
        {
            InitializeComponent();
            containerSize = Properties.Settings.Default.gameSizeMode;
            multipleMode  = Properties.Settings.Default.gameMultipleMode;
            switch (containerSize)
            {
            case 4:
                this.Size = new Size(466, 659);
                break;

            case 5:
                this.Size = new Size(686, 769);
                break;

            case 6:
                this.Size = new Size(686, 879);
                break;

            case 7:
                this.Size = new Size(796, 989);
                break;

            case 8:
                this.Size = new Size(906, 1099);
                break;
            }
            if (Properties.Settings.Default.clearGame == true)
            {
                infinityMode = true;
                ((ToolStripMenuItem)무한모드ToolStripMenuItem).Enabled = true;
                ((ToolStripMenuItem)무한모드ToolStripMenuItem).Checked = true;
            }
            else
            {
                infinityMode = false;
                ((ToolStripMenuItem)무한모드ToolStripMenuItem).Enabled = false;
                ((ToolStripMenuItem)무한모드ToolStripMenuItem).Checked = false;
            }


            infinityText      = Color.FromArgb(245, 213, 228);
            Color             = Color.FromArgb(202, 193, 181);
            TitleColor        = Color.FromArgb(117, 110, 102);
            ScoreColor        = Color.FromArgb(157, 150, 142);
            ScoreFontColor    = Color.FromArgb(240, 240, 240);
            brush             = new SolidBrush(Color);
            infinityTextbrush = new SolidBrush(infinityText);
            Titlebrush        = new SolidBrush(TitleColor);
            Scorebrush        = new SolidBrush(ScoreColor);
            ScoreFontbrush    = new SolidBrush(ScoreFontColor);
            dist             = 10;
            titleFont        = new Font("Verdana", 50, FontStyle.Bold);
            scoreFont        = new Font("Airal", 20);
            infinityTextFont = new Font("휴먼편지체", 15, FontStyle.Bold);
            typeof(Panel).InvokeMember("DoubleBuffered", System.Reflection.BindingFlags.SetProperty | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic, null, panel1, new object[] { true });



            container         = new BlockContainer(containerSize, this);
            panel1.Visible    = false;
            panel1.BackColor  = Color.FromArgb(0, Color.White);
            button1.BackColor = Color.FromArgb(0, Color.White);
            label1.BackColor  = Color.Transparent;

            score = new Score(this);
        }