//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; }
public void init() { //Colore schermo: this.BackColor = Const.BackgroundColor; //colore dei pulsanti Const.settingColorButton(ref ButtonMenu); Const.checkLabelLangh(ref label1, typeLabel.helptext); }
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); }
public void init() { //vado a posizionare i vari pulsanti sullp schemo startGame.Location = new Point(Const.widthScreen / 2 - startGame.Width / 2, Const.heightScreen / 4 - startGame.Height); help.Location = new Point(Const.widthScreen / 2 - startGame.Width / 2, startGame.Location.Y + 100); setting.Location = new Point(Const.widthScreen / 2 - startGame.Width / 2, help.Location.Y + 100); ButtonExit.Location = new Point(Const.widthScreen / 2 - ButtonExit.Width / 2, setting.Location.Y + 100); //adesso andiamo a impostare i colori dei pulsanti e dello schemro //Colore schermo: this.BackColor = Const.BackgroundColor; //colore dei pulsanti Const.settingColorButton(ref startGame); Const.settingColorButton(ref setting); Const.settingColorButton(ref ButtonExit); Const.settingColorButton(ref help); Const.checkButtonLangh(ref startGame, typeButton.start); Const.checkButtonLangh(ref setting, typeButton.setting); Const.checkButtonLangh(ref ButtonExit, typeButton.exit); }