Esempio n. 1
0
        public LEVEL_1(string filename)
        {
            InitializeComponent();

            n   = g.READNFA(filename);
            dfa = n.NFAtoDFA(n);
            label_out_of.Text = n.rhymeno.ToString() + "/" + i.ToString();
            //lables title
            string tocheck = n.rhyme;

            label_search.Visible     = true;
            textBox_word.Visible     = true;
            label_correct.Visible    = true;
            label_out_of.Visible     = true;
            LABEL_SCORE.Visible      = true;
            label_score_.Visible     = true;
            label_word.Text          = tocheck;
            label_word.Visible       = true;
            label_text_enter.Visible = true;

            //tablelayoutpanel create
            tableLayoutPanel_chars.Visible   = true;
            tableLayoutPanel_chars.BackColor = Color.Moccasin;


            //lablescreated for transitions
            for (int k = 0; k < n.TS; k++)
            {
                for (int j = 0; j < n.TT[k].Count; j++)
                {
                    Label l = new Label();
                    l.BackColor = Color.Moccasin;
                    l.ForeColor = Color.Red;
                    l.Font      = new Font(new FontFamily("Showcard Gothic"), 14);
                    l.Size      = new Size(96, 60);
                    l.Location  = new Point(4, 1);
                    l.Text      = n.TT[k][j].getString().ToString();
                    l.TextAlign = ContentAlignment.MiddleCenter;
                    l.Visible   = true;

                    tableLayoutPanel_chars.Controls.Add(l);
                }
            }

            /*  for (int i = 0; i < n.rhymeno;i++ )
             * {
             *    Button button = new Button();
             *    button.BackColor = Color.Moccasin;
             *    button.ForeColor = Color.Red;
             *    button.Text = "check";
             *
             * }*/
            button_check.Visible = true;
        }