public ParcourModel(ParcourModel p) { this.Id = p.Id; this.Map = p.Map; foreach (Line l in p.Line) { this.Line.Add(Factory.Line(l)); } this.Name = p.Name; }
public MapPageViewModel(Interfaces.INavigation navigation) : base(navigation) { Visibility = false; Etapes = new List <EtapeModel>(); Etapes.Add(new EtapeModel { Id = 0, Nom = "Premiere etape", Position = new Position { X = 3.942726, Y = 50.453441 }, PhotoPath = "gareMons.jpg", Question = "De quelle couleur est la gare" }); Parcour = new ParcourModel { Id = 1, Nom = "Ouest", Steps = Etapes }; YMin = 50.444979; XMin = 3.922902; YMax = 50.462576; XMax = 3.972641; XActu = 3.964573; YActu = 50.452876; MultY = (1 / (YMax - YMin)); MultX = (1 / (XMax - XMin)); PosYActu = ((YMax - YActu) * MultY); PosXActu = ((XMax - XActu) * MultX); //field.Children.Add(demon, new Rectangle(PosYActu, PosXActu, 0.06, 0.06), AbsoluteLayoutFlags.All); PutPin(); Move(); }
public ParcourModel(ParcourModel pm, double firstWeight) { this.desiredLengthFactor = pm.desiredLengthFactor; this.channel = pm.channel; this.c = pm.c; foreach (ParcourChannel pc in pm.Channels) { AddCorridor(pc); } Randomize(firstWeight); }