Esempio n. 1
0
        private void button14_Click(object sender, EventArgs e)
        {
            panconv = panel1;
            panel1.Hide();
            panel2.Hide();
            if (!cours)
            {
                choixMultiple choiADj = new choixMultiple(ComMethodes.Generate(7, 10), "Adjectifs", panconv, 7, 10, "Francais");

                userconv         = choiADj;
                userconv.Visible = true;
                choiADj.Show();
                choiADj.BringToFront();
                this.Controls.Add(choiADj);
                choiADj.Dock = DockStyle.Fill;
                pictureBox1.BringToFront();
            }
            else
            {
                Cours cf = new Cours();
                cf.conjugaison = false;
                cf.debut       = 7;
                cf.fin         = 15;
                cf.Show();
            }
        }
Esempio n. 2
0
        private void button15_Click(object sender, EventArgs e)
        {
            panconv = panel2;
            panel1.Hide();
            panel2.Hide();
            if (!cours)
            {
                pictureBox1.Visible = true;
                choixMultiple choiprn = new choixMultiple(ComMethodes.Generate(6, 10), "Posses", panconv, 6, 10, "Francais");


                userconv         = choiprn;
                userconv.Visible = true;
                choiprn.Show();
                choiprn.BringToFront();
                this.Controls.Add(choiprn);
                choiprn.Dock = DockStyle.Fill;
                pictureBox1.BringToFront();
            }
            else
            {
                Cours cf = new Cours();
                cf.conjugaison = false;
                cf.debut       = 29;
                cf.fin         = 31;
                cf.Show();
            }
        }
        private void suivant()
        {
            panel1.Controls.Clear();
            ar = ComMethodes.Generate(5, 10);
            for (int j = 0; j < 5; j++)
            {
                s = gram.GetElementsByTagName("VerbesEtSujets")[0].InnerText.Split('=')[(int)ar[j]].Trim(' ');
                mots.AddRange(s.Split('8'));
                motsLabels = new Label[mots.Count];

                //pp[j] = new Panel(); pp[j].Size = new Size(750, 50); pp[j].BackColor = Color.Transparent; pp[j].Location = new Point(20, j * 50 + j * 5);// pp[j].MouseDown += pp_mousedwn; pp[j].MouseMove += pp_mousemove; pp[j].MouseUp += pp_mouseUp;
                //this.Controls.Add(pp[j]);
                for (int i = 0; i < mots.Count; i++)
                {
                    Label l = new Label(); l.BackColor = System.Drawing.SystemColors.Info; l.ForeColor = Color.Black; l.TextAlign = ContentAlignment.MiddleCenter; l.Font = new Font("Comic SAns MS", 8f);
                    l.Location = new Point(100 + i * 100, 50 * j + 10);

                    motsLabels[i] = l;
                    if (mots[i][mots[i].Length - 1] == '1')
                    {
                        mots[i] = mots[i].Remove(mots[i].Length - 1); answr1.Add(motsLabels[i]);
                    }
                    else if (mots[i][mots[i].Length - 1] == '2')
                    {
                        mots[i] = mots[i].Remove(mots[i].Length - 1); answr2.Add(motsLabels[i]);
                    }
                    motsLabels[i].Text = mots[i]; motsLabels[i].MouseDown += lbl_mousemouve; motsLabels[i].MouseMove += lbl_mousedwn; panel1.Controls.Add(motsLabels[i]); motsLabels[i].BringToFront();
                }
                motsLabels = null; mots = new List <string>();
            }
        }
Esempio n. 4
0
        private void lvl1_grams(object sender, EventArgs e)
        {
            Button lb = (Button)sender; binding2.Dispose();

            panel1.Hide(); panel2.Visible = false;
            int a = int.Parse(lb.Tag.ToString().Split(',')[0]), b = int.Parse(lb.Tag.ToString().Split(',')[1]);

            binding2 = new binding(lb.Tag.ToString().Split(',')[5], int.Parse(lb.Tag.ToString().Split(',')[3]), int.Parse(lb.Tag.ToString().Split(',')[2]), panconv, ComMethodes.Generate(a, b)); userconv = binding2;
            //binding2.rand = ComMethodes.Generate(a, b); binding2.dest = int.Parse(lb.Tag.ToString().Split(',')[3]);
            //binding2.depart = int.Parse(lb.Tag.ToString().Split(',')[2]); binding2.lecon = lb.Tag.ToString().Split(',')[5]; binding2.Location = new Point(200, 150);binding2.panl = panconv;
            binding2.Location = new Point(200, 150); this.Controls.Add(binding2);
            userconv.Visible  = true;
        }