示例#1
0
    //convert Flower to Element
    public Element copyToElement()
    {
        string fleur   = _espece.ToString().ToLower();
        string taille  = _taille.ToString().ToLower();
        string couleur = _couleur.ToString().ToLower();
        string nom     = _const.ToString().ToLower();
        int    x       = (int)_x;
        int    y       = (int)_y;

        if (string.Compare(nom, "none") == 0)
        {
            nom = null;
        }
        //correction des feminins
        if (string.Compare(couleur, "blanche") == 0)
        {
            couleur = "blanc";
        }
        switch (taille)
        {
        case "grande":
            taille = "grand";
            break;

        case "moyenne":
            taille = "moyen";
            break;

        case "petite":
            taille = "petit";
            break;
        }
        Element = new Element(x, y, fleur, taille, couleur, nom);
        return(Element);
    }
示例#2
0
        //Transforme un groupe sous la forme Element, dElement
        public override Element Déconstruire()
        {
            Element     e = new Element();
            dElement    d;
            TypeElement type = Acces.type_MODELEDOC;

            e.ID           = ID;
            e.Element_Type = type.ID;
            e.Code         = Code;
            e.Libelle      = Libelle;
            e.Type_Element = (int)Type_Modele;
            e.Actif        = Actif;

            string CodeAttribut = "";

            {
                CodeAttribut = "PARENT_ID";
                d            = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, Parent_ID.ToString());
                e.Liste.Add(d);
            }
            {
                CodeAttribut = "FICHIERBASE";
                d            = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, FichierBase);
                e.Liste.Add(d);
            }
            {
                CodeAttribut = "ORDRE";
                d            = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, Ordre.ToString());
                e.Liste.Add(d);
            }
            {
                CodeAttribut = "CONDITION";
                d            = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, Condition);
                e.Liste.Add(d);
            }
            {
                CodeAttribut = "CONTENU";
                d            = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, Contenu);
                e.Liste.Add(d);
            }
            {
                CodeAttribut = "TAILLE";
                d            = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, Taille.ToString());
                e.Liste.Add(d);
            }
            {
                CodeAttribut = "ALIGNEMENT";
                d            = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, ((int)Alignement).ToString());
                e.Liste.Add(d);
            }
            {
                CodeAttribut = "BORDURE";
                d            = new dElement(ID, Acces.Trouver_Attribut(type, CodeAttribut).ID, CodeAttribut, Bordure);
                e.Liste.Add(d);
            }
            return(e);
        }
示例#3
0
 public string Description()
 {
     return("Enclos : " + Nom + " de taille : " + Taille.ToString() + " m². C'est un(e) " + Type);
 }