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(); }
public void RaferchirSymetriePoulies() { if (this.ConfigInteraction.Jss) { this.TypeSymetrie = TypeSymetriePoulies.JssHorloge; } else { this.TypeSymetrie = TypeSymetriePoulies.VsHorloge; } 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); }