Пример #1
0
 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;
 }
Пример #2
0
 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();
 }
Пример #3
0
 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);
 }