public void Start()
 {
     PuzzlesStrategyFactoryMethod puzzlesStrategy = new PuzzlesStrategyFactoryMethod(_pictureBox.Image);
     IPuzzlesStrategy differentPuzzleStrategy = puzzlesStrategy.GetStrategy(PuzzlesConfigurations.StrategyTypeEnum.Different);
     List<Puzzle> puzzlesList = differentPuzzleStrategy.ExtractPuzzles();
     SetPuzzleImage setImagesToPuzzles = new SetPuzzleImage(_pictureBox);
     puzzlesList = setImagesToPuzzles.SetImage(puzzlesList);
     SetConjunctionBetweenPuzzles setConnection = new SetConjunctionBetweenPuzzles(puzzlesList, _form,_pictureBox);
     setConnection.SetConnection();
     basicPictureLocationList = puzzlesList.Clone<Puzzle>().ToList();
     ThrowPuzzlesOnDesk throwPuzzles = new ThrowPuzzlesOnDesk(_form, _pictureBox);
     mixedPictureLocationList = throwPuzzles.Throw(puzzlesList);
     eventHandlers = new PuzzleEventHandlers(_form, basicPictureLocationList, mixedPictureLocationList);
     eventHandlers.SetHandlers(_pictureBox);
 }
示例#2
0
        public void Start()
        {
            PuzzlesStrategyFactoryMethod puzzlesStrategy         = new PuzzlesStrategyFactoryMethod(_pictureBox.Image);
            IPuzzlesStrategy             differentPuzzleStrategy = puzzlesStrategy.GetStrategy(PuzzlesConfigurations.StrategyTypeEnum.Different);
            List <Puzzle>  puzzlesList        = differentPuzzleStrategy.ExtractPuzzles();
            SetPuzzleImage setImagesToPuzzles = new SetPuzzleImage(_pictureBox);

            puzzlesList = setImagesToPuzzles.SetImage(puzzlesList);
            SetConjunctionBetweenPuzzles setConnection = new SetConjunctionBetweenPuzzles(puzzlesList, _form, _pictureBox);

            setConnection.SetConnection();
            basicPictureLocationList = puzzlesList.Clone <Puzzle>().ToList();
            ThrowPuzzlesOnDesk throwPuzzles = new ThrowPuzzlesOnDesk(_form, _pictureBox);

            mixedPictureLocationList = throwPuzzles.Throw(puzzlesList);
            eventHandlers            = new PuzzleEventHandlers(_form, basicPictureLocationList, mixedPictureLocationList);
            eventHandlers.SetHandlers(_pictureBox);
        }