Esempio n. 1
0
        private void cargaboto()
        {
            //Carga categoria 1 entrada
            ApiBase       apbase    = new ApiBase();
            IRestResponse respuesta = apbase.execApi(urlcatgcont, coman);

            listaCatg = JsonConvert.DeserializeObject <List <Model.CategModel> >(respuesta.Content);

            for (int i = 0; i < listaCatg.Count; i++)
            {
                Button botonCat = new Button();
                botonCat.Name   = "btncat" + i;
                botonCat.Text   = listaCatg[i].nombre;
                botonCat.Width  = 90;
                botonCat.Height = 80;
                flpCplatosfue.Controls.Add(botonCat);
                botonCat.Click += new EventHandler(clickCatg);
            }
        }