Exemple #1
0
        public Przyklad Podaj()
        {
            Random r = new Random();
            int    n = r.Next(arr.Count());

            Przyklad pom = arr[n];

            arr.RemoveAt(n);

            return(pom);
        }
Exemple #2
0
        private void Fill()
        {
            podetap = etap.Podaj();

            podetap.fill_przyklad(button1, button2, label1);

            button1.Enabled   = true;
            button2.Enabled   = true;
            button1.BackColor = SystemColors.Control;
            button2.BackColor = SystemColors.Control;
        }
Exemple #3
0
        public void Wrzuc(int a)
        {
            String W_1 = "";
            String W_2 = "";

            if (a != 0)
            {
                if (a == 1)
                {
                    W_1 = "RZ";
                    W_2 = "Ż";
                }
                else if (a == 2)
                {
                    W_1 = "CH";
                    W_2 = "H";
                }
                else if (a == 3)
                {
                    W_1 = "Ó";
                    W_2 = "U";
                }
            }

            foreach (DataRow dr in table_SQ.Rows)
            {
                int b;

                if (a == 0)
                {
                    W_1 = dr["W_1"].ToString();
                    W_2 = dr["W_2"].ToString();
                }

                if ((bool)dr["Odpowiedz"])
                {
                    b = 2;
                }
                else
                {
                    b = 1;
                }

                Przyklad pom = new Przyklad(dr["Slowo"].ToString(),
                                            W_1,
                                            W_2,
                                            b);
                arr.Add(pom);
            }
        }