Ejemplo n.º 1
0
        public static List <ThemeEvaluationModel> LoadAllEvaluationTheme(string nomFond)
        {
            XDocument fileTheme = XDocument.Load(@"../../Theme/listeThemesEvaluation.xml");
            var       th        = from theme in fileTheme.Descendants("Theme") select theme;
            List <ThemeEvaluationModel> listeTheme = new List <ThemeEvaluationModel>();

            foreach (var theme in th)
            {
                string nom = (string)theme.Element("Nom");
                if (nomFond == "ParDefaut.jpg")
                {
                    nom = "Defaut";
                }
                string cheminCible    = "../../Theme/Evaluation/" + nom + "/Cible/cible.png";
                string cheminChasseur = "../../Theme/Evaluation/" + nom + "/Chasseur/shape.png";
                string fond           = "../../Theme/Evaluation/Fond/" + nomFond;
                nom = (string)theme.Element("Nom");
                if (nomFond == "ParDefaut.jpg" && nom == "Cercle")
                {
                    cheminCible = "";
                }
                ThemeEvaluationModel themeEval = new ThemeEvaluationModel(nom, cheminCible, cheminChasseur, fond);
                if (nom == "Cible")
                {
                    themeEval.Chasseur2 = "../../Theme/Evaluation/" + nom + "/Chasseur/shape2.png";
                }

                listeTheme.Add(themeEval);
            }
            return(listeTheme);
        }
Ejemplo n.º 2
0
        public ExerciceEvaluation(ExerciceBaseConfig baseConf, ExerciceBorneConfig borneConf, ThemeEvaluationModel theme)
            : base(baseConf, borneConf)
        {
            initdetextstop = new DataPosition(0, 0);

            ThemeEnfant       = theme;
            this.TypeExercice = ExerciceTypes.Evaluation;
        }
Ejemplo n.º 3
0
        public static ExerciceEvaluation GetExerciceEvaluation(string type, ThemeEvaluationModel themeEnfant, TypeExercicePoulies typeExopoulies, TypeSymetriePoulies sym, int decalage)
        {
            ExerciceEvaluation exo;

            switch (type)
            {
            case "poulies": exo = new ExercicePoulies(ExerciceConfig.GetBaseConfig(), ExerciceConfig.GetBigBorne(), themeEnfant, new InteractionConfig(), sym, typeExopoulies, decalage);
                break;

            default: exo = new ExerciceEvaluation(ExerciceConfig.GetBaseConfig(), ExerciceConfig.GetBigBorne(), null);
                break;
            }
            return(exo);
        }
Ejemplo n.º 4
0
 public ExerciceMouvement(ExerciceBaseConfig baseConf, ExerciceBorneConfig borneConf, ThemeEvaluationModel theme)
     : base(baseConf, borneConf, theme)
 {
     this.TypeEval       = ExerciceEvalTypes.Mouvement;
     this.PositionDroite = 2;
 }
Ejemplo n.º 5
0
 public Square(ExerciceBaseConfig baseConf, ExerciceBorneConfig borneConf, ThemeEvaluationModel theme)
     : base(baseConf, borneConf, theme)
 {
     this.NbrPolygone = 4;
     this.TypeForme   = FormeType.Carré;
 }
Ejemplo n.º 6
0
        public ExercicePoulies(ExerciceBaseConfig baseConf, ExerciceBorneConfig borneConf, ThemeEvaluationModel theme, InteractionConfig configInt, TypeSymetriePoulies typeS, TypeExercicePoulies typeE, int decalage)
            : base(baseConf, borneConf, theme)
        {
            TypeSymetrie = typeS;
            TypeExercice = typeE;
            Decalage     = decalage;

            ConfigInteraction = configInt;

            if (this.TypeSymetrie == TypeSymetriePoulies.JssHorloge || this.TypeSymetrie == TypeSymetriePoulies.JssAntiHorloge)
            {
                ConfigInteraction.Jss = true;
            }
            else
            {
                ConfigInteraction.Vs = true;
            }

            Plats = new ObservableCollection <Plateau>();
            Plateau plat        = new Plateau(850, 70, TypePlateau.Normal, typeE);
            Plateau platFantome = new Plateau(850, 70, TypePlateau.Fantome, typeE);

            Plats.Add(platFantome);
            Plats.Add(plat);

            //ajuste l'emplacement des poulies en fonction de la taille du plateau.
            double xPoulieGauche = Plats[1].X;

            PoulieGauche = new Poulie(xPoulieGauche, TypePoulies.Gauche, TypeSymetrie);

            double xPoulieDroite = PoulieGauche.X + Plats[1].Width;

            PoulieDroite = new Poulie(xPoulieDroite, TypePoulies.Droite, TypeSymetrie);

            //Permet aux plateaux de ne pas dépacer les poulies
            Plats[0].HauteurMax = PoulieGauche.Y + PoulieGauche.Rayon + PoulieGauche.Taille;
            Plats[1].HauteurMax = PoulieGauche.Y + PoulieGauche.Rayon + PoulieGauche.Taille;

            BarreVerticale = new PointCollection();
            BarreVerticale.Add(new Point(Plats[1].X + Plats[1].Width / 2, (PoulieGauche.Y + PoulieGauche.Rayon + PoulieGauche.Taille) - 50));
            BarreVerticale.Add(new Point(Plats[1].X + Plats[1].Width / 2, Plats[1].Y + Plats[1].Height / 2));
            this.PourcentageAssistance = 0;
            this.ValeurSliderAssist    = -1;
            DefinirDureePause();
        }
Ejemplo n.º 7
0
 public ExerciceForme(ExerciceBaseConfig baseConf, ExerciceBorneConfig borneConf, ThemeEvaluationModel theme)
     : base(baseConf, borneConf, theme)
 {
     this.TypeEval    = ExerciceEvalTypes.Forme;
     this.Taille      = 1;
     this.Origine     = 2;
     this.AllerRetour = false;
 }
Ejemplo n.º 8
0
 public Target(ExerciceBaseConfig baseConf, ExerciceBorneConfig borneConf, ThemeEvaluationModel theme)
     : base(baseConf, borneConf, theme)
 {
     this.TypeDroite = DroiteType.Vertical;
 }
Ejemplo n.º 9
0
 public Circle(ExerciceBaseConfig baseConf, ExerciceBorneConfig borneConf, ThemeEvaluationModel theme)
     : base(baseConf, borneConf, theme)
 {
     this.NbrPolygone = 40;
     this.TypeForme   = FormeType.Cercle;
 }
Ejemplo n.º 10
0
 public FreeAmplitude(ExerciceBaseConfig baseConf, ExerciceBorneConfig borneConf, ThemeEvaluationModel theme)
     : base(baseConf, borneConf, theme)
 {
     this.TypeDroite = DroiteType.VerticalLong;
 }
Ejemplo n.º 11
0
 public Tonus(ExerciceBaseConfig baseConf, ExerciceBorneConfig borneConf, ThemeEvaluationModel theme)
     : base(baseConf, borneConf, theme)
 {
     this.TypeDroite = DroiteType.Tonus;
 }