Exemplo n.º 1
0
 public void BuildPicture()
 {
     if (basicPictureLocationList != null)
     {
         picture = new AutoConstructPicture(_form, _pictureBox);
         picture.Construct(basicPictureLocationList);
     }
 }
Exemplo n.º 2
0
 public void BuildPicture()
 {
     if (basicPictureLocationList != null)
     {
         picture = new AutoConstructPicture(_form, _pictureBox);
         picture.Construct(basicPictureLocationList);
     }
 }
Exemplo n.º 3
0
        public void AutoConstructPictureTest()
        {
            AutoConstructPicture autoConstruct = new AutoConstructPicture(formGameTable, pictureBox);
            var controls = formGameTable.Controls.Cast<Control>();
            autoConstruct.Construct(puzzles);

            List<Puzzle> puzzlesAfterConstruction = controls
              .Where(x => x.GetType() == typeof(Puzzle))
              .Cast<Puzzle>()
             .ToList();
            Assert.AreEqual(puzzlesAfterConstruction.Count, puzzles.Count * 2);
        }