Esempio n. 1
0
 private void insereMEMO(String nome)
 {
     panelAlterar.Visible = false;
     try
     {
         leftAtual += 150;
         Button btnAux = buttonsAdded[0];
         upAtual = btnAux.Location.Y;
         Logica    aux        = (Logica)logicas[logica];
         ArrayList instrucoes = aux.obterArrayList();
         pos = instrucoes.Count;
         aux.insereMEMO(nome, pos);
         Panel pnl = panelsAdded[logica];
         #region peçaMEMO
         Button btn = new Button();
         btn.Location          = new Point(leftAtual, upAtual);
         btn.Height            = 120;
         btn.Width             = 150;
         btn.Text              = nome;
         btn.Image             = imageList1.Images[8];
         btn.TextImageRelation = TextImageRelation.TextAboveImage;
         btn.FlatStyle         = FlatStyle.Flat;
         btn.Tag    = pos;
         btn.Click += delegate { btnLadder(btn, pnl); };
         pnl.Controls.Add(btn);
         buttonsAdded.Add(btn);
         btnLadder(btn, pnl);
         #endregion
         txtNome.Text = "";
         btn.AccessibleDescription = "Full";
     }
     catch
     {
         MessageBox.Show("Deve se iniciar com SEL ou SED");
     }
 }