Exemple #1
0
        public Form1()
        {
            InitializeComponent();
            this.BackgroundImage = Properties.Resources._1172866;

            players     = new Igrac[10];
            broj_igraca = 0;
            lista       = new String[10, 2]; //sluzi kao lista meceva gde je i prvom [] prvi igrac, a [drugi] igrac

            btn_lista            = new myButton[10];
            lbl_lista_Rangiranja = new Label[10];


            for (int j = 0; j < 10; j++)
            {
                btn_lista[j]          = new myButton();
                btn_lista[j].Num1     = j; //j-ti element
                btn_lista[j].Click   += new EventHandler(myButtonClick);
                btn_lista[j].Location = new Point(270, j * 28 + 186); btn_lista[j].Visible = false;
                btn_lista[j].Font     = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                //Controls.Add(btn_lista[j]);
            }


            AktivacijaKljuca();
            //baza.generateKeys();
            //if (baza.conect())
            //  lblNewLabel.Text = ""+baza.CountRows();
        }
Exemple #2
0
        private void myButtonClick(object sender, EventArgs e)
        {
            myButton btn = sender as myButton;

            unos1 un = new unos1(lista[btn.Num1, 0], lista[btn.Num1, 1], ref players, broj_igraca, btn.Num1);

            un.Show();

            // lblNewLabel.Text = "" + broj_utakmica +" "+broj_klikova;

            if (broj_klikova + 1 == broj_utakmica)
            {
                broj_klikova    = 0;
                button1.Enabled = true;
            }
        }