Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- Label Lbl = new Label();
- Lbl.Name = "slabel" + Idx.ToString();
- Lbl.Text = textBox1.Text;
- if (Idx == 1)
- {
- Lbl.Location = Lbl.Location;
- }
- else
- {
- var PrevCont = panel1.Controls.Find("slabel" + (Idx - 1).ToString(),true);
- Lbl.Location.X = PrevCont[1].Location.X;
- Lbl.Location.Y = PrevCont[1].Location.Y+10;
- }
- panel1.Controls.Add(Lbl);
- Idx++;
- var c = new Choices();
- c.Add(textBox1.Text);
- var gb = new GrammarBuilder(c);
- var g = new Grammar(gb);
- rec.LoadGrammar(g);
- rec.Enabled = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement