Exemple #1
0
        //metodo utilizzato per adattare le dim dello schermo e inserire un background
        public void init()
        {
            pictureBox1.Location = new Point(Const.widthScreen / 2 - pictureBox1.Width / 2 - 40, 30);

            //Per priam cosa vado a poszionare i vari elementi sullo schermo
            int currentDot = dotSize;

            if (currentL.difficulty == 2)
            {
                currentDot = (int)dotSize / 2;
            }
            else if (currentL.difficulty == 1)
            {
                currentDot = (int)dotSize / 4;
            }
            sizePicture2 = 6 * currentDot;


            int posXObjectRight = pictureBox1.Location.X + pictureBox1.Width + 10;


            label1.Location = new Point(posXObjectRight, pictureBox1.Location.Y);


            pictureBox2.Location = new Point(posXObjectRight, label1.Location.Y + 50);

            button2.Location = new Point(posXObjectRight, pictureBox2.Location.Y + sizePicture2 + 20);


            ButtonReset.Location = new Point(pictureBox1.Location.X, pictureBox1.Location.Y + pictureBox1.Height + 20);

            label2.Location = new Point(posXObjectRight, button2.Location.Y + button2.Height + 20);

            buttonMenu.Location = new Point(20, 20);



            //adesso andiamo a impostare i colori dei pulsanti e dello schemro
            //Colore schermo:
            this.BackColor = Const.BackgroundColor;

            //colore dei pulsanti
            Const.settingColorButton(ref button2);
            Const.settingColorButton(ref ButtonReset);
            Const.settingColorButton(ref buttonMenu);
            Const.checkButtonLangh(ref button2, typeButton.skip);
            Const.checkLabelLangh(ref label1, typeLabel.proxFig);
            Const.checkLabelLangh(ref label2, typeLabel.score);


            //la figura corrente viene scelta randomicamente attraverso una funzione appositamente creata per questo scopo
            nextShape    = getNextShape();
            currentShape = nextShape;
        }
Exemple #2
0
        public void init()
        {
            //Colore schermo:
            this.BackColor = Const.BackgroundColor;


            //colore dei pulsanti
            Const.settingColorButton(ref ButtonMenu);

            Const.checkLabelLangh(ref label1, typeLabel.helptext);
        }
Exemple #3
0
        public void init()
        {
            //adesso andiamo a impostare i colori dei pulsanti e dello schemro
            //Colore schermo:
            this.BackColor = Const.BackgroundColor;


            //colore dei pulsanti
            Const.settingColorButton(ref ButtonMenu);
            Const.settingColorButton(ref buttonSave);
            Const.checkButtonLangh(ref buttonSave, typeButton.save);

            Const.checkLabelLangh(ref labelLanguage, typeLabel.Language);
            Const.checkLabelLangh(ref labelLivel, typeLabel.Liv);
            Const.checkLabelLangh(ref labelColor1, typeLabel.colorBack);
            Const.checkLabelLangh(ref labelColor2, typeLabel.colorBBackGr);
            Const.checkLabelLangh(ref labelColor3, typeLabel.colorText);
        }
Exemple #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     Const.score++;
     Const.checkLabelLangh(ref label2, typeLabel.score);
     currentShape = getNextShape();
 }