Beispiel #1
0
        public vjezba()
        {
            InitializeComponent();
            //Baza.init();
            //Baza.callsPreBase();
            Sentence.rjecnik = Baza.get();

            //Baza.DBOperation("SELECT * FROM STANJA_R", true);
            question     = Baza.getNextLetter(type);
            pitanje.Text = question;

            Grid.SetRow(L, 3);
            Grid.SetRowSpan(L, 2);
            Grid.SetColumn(L, 4);

            Grid.SetRow(L2, 3);
            Grid.SetRowSpan(L2, 2);
            Grid.SetColumn(L2, 3);

            g1.Children.Add(L);
            g1.Children.Add(L2);



            //update(1, false);
        }
Beispiel #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            recenice.Add("Pod tim se slojem nazirala");
            recenice.Add("A meni kad ćeš?");
            recenice.Add("Dobit ćeš! Dobar budi!");
            recenice.Add("Rasteš.");
            recenice.Add("Jelo na stolu čeka.");
            recenice.Add("Koju? Ovu uz peć?");
            recenice.Add("Najbolji komad daješ.");

            Random r = new Random();

            r1            = recenice[r.Next() % (recenice.Count)];
            sentence.Text = r1;

            for (int i = 0; i < 30; ++i)
            {
                slovaGUI.Add(new LetterGUI(75 + i));
            }
            for (int i = 0; i < 10; ++i)
            {
                LetterGUI L = new LetterGUI(i);
                Grid.SetRow(L, 3);
                Grid.SetColumn(L, 2 * i + 2);
                g1.Children.Add(L);

                slovaGUI[9 - i] = L;
            }
            for (int i = 0; i < 10; ++i)
            {
                LetterGUI L = new LetterGUI(i + 10);
                Grid.SetRow(L, 5);
                Grid.SetColumn(L, 2 * i + 2);
                g1.Children.Add(L);

                slovaGUI[19 - i] = L;
            }
            for (int i = 0; i < 10; ++i)
            {
                LetterGUI L = new LetterGUI(i + 20);
                Grid.SetRow(L, 7);
                Grid.SetColumn(L, 2 * i + 2);
                g1.Children.Add(L);

                slovaGUI[29 - i] = L;
            }

            Sentence.rjecnik = Baza.get();
        }