Exemple #1
0
        private string[,]  createTab(int whatLevel, SallesEntitie salle = null, NiveauEntitie niveau = null)
        {
            // si on est sur niveau

            if (whatLevel == 0)
            {
                string[,] tab =
                {
                    { niveau.nom, niveau.specialite, niveau.nombre_ensegnant, niveau.nbre_ue,    niveau.annee_scolaire, niveau.id },
                    { "Nom : ",   " Specilite : ",   " Enseignant : ",        " Nombre d'ue : ", " Annee Scolaire : ",  "id :"    }
                };
                this.tabs = tab;
                return(tab);
            }

            else
            {
                string[,] tab =
                {
                    { salle.nom, salle.type, salle.batiment, salle.nbrePrise,      salle.nbrPlace,        salle.id },
                    { "Nom ",    "Type :",   "Batiment : ",  "Nombre de prise : ", "Nombre de place  : ", "id :"   }
                };
                this.tabs = tab;

                return(tab);
            }
        }
        public FlowLayoutPanel GenerateTextForNiveau(SallesEntitie item)
        {
            FontFamily fontFTitle = new FontFamily("Microsoft Sans Serif");
            Font       font       = new Font(
                fontFTitle,
                12,
                FontStyle.Bold,
                GraphicsUnit.Point);

            FontFamily fontFItem = new FontFamily("Microsoft Sans Serif");
            Font       fontItem  = new Font(
                fontFItem,
                9,
                FontStyle.Regular,
                GraphicsUnit.Point);

            BunifuCustomLabel nom = new BunifuCustomLabel();

            nom.Text = "  Nom :  " + item.nom;
            nom.Font = font;

            BunifuCustomLabel batiment = new BunifuCustomLabel();

            batiment.Text = "    Batiment :  " + item.batiment;
            batiment.Font = fontItem;

            BunifuCustomLabel nbrePrise = new BunifuCustomLabel();

            nbrePrise.Text = "    Nombre de prise :  " + item.nbrePrise;
            nbrePrise.Font = fontItem;


            FlowLayoutPanel flowLayout = new FlowLayoutPanel();

            flowLayout.Controls.Add(nom);
            flowLayout.Controls.Add(batiment);
            flowLayout.Controls.Add(nbrePrise);

            return(flowLayout);
        }