using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ProjetDotNet.metier;

namespace ProjetDotNet.COR
{
    /*
     * Gère le chargement d'un triangle
     */
    public class CORChargerTriangle:CORChargerForme
    {
        public CORChargerTriangle(CORChargerForme suivant):base(suivant)
        {

        }

        public CORChargerTriangle():base()
        {
            
        }

        /*public override Forme charge(int id)
        {
            bool bonType=this.CONNEXION.DAO_TRIANGLE.isSameType(id);
            if (bonType)
            {
                Triangle t = this.CONNEXION.DAO_TRIANGLE.charge(id);
                return t;
            }
            else
            {
                return this.GetSuccessor().charge(id);
            }
        }*/

        public override Forme charge(int id,string nomFigure)
        {
            bool bonType = this.CONNEXION.DAO_TRIANGLE.isSameType(id,nomFigure);
            if (bonType)
            {
                Triangle t = this.CONNEXION.DAO_TRIANGLE.charge(id,nomFigure);
                return t;
            }
            else
            {
                return this.GetSuccessor().charge(id, nomFigure);
            }
        }

    }
}
