public MainWindow()
        {
            logger          = NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger();
            telemetryWriter = new TelemetryWriter();
            logger.Info("\n\nApp start");
            telemetryWriter.WriteAppStart();
            messageBoxService  = new MessageBoxService();
            dbService          = new DbService();
            drawService        = new DrawService(logger);
            throwService       = new ThrowService(logger);
            configService      = new ConfigService(logger, dbService);
            scoreBoardService  = new ScoreBoardService(logger, configService, drawService);
            camsDetectionBoard = new CamsDetectionBoard(configService, logger, drawService);
            fileSystemService  = new FileSystemService();
            versionChecker     = new VersionChecker(appVersion, fileSystemService, dbService, configService, messageBoxService);
            detectionService   = new DetectionService(drawService, configService, throwService, logger, camsDetectionBoard);
            manualThrowPanel   = new ManualThrowPanel(logger, detectionService);
            gameService        = new GameService(scoreBoardService, camsDetectionBoard, detectionService, logger, dbService, manualThrowPanel);

            InitializeComponent();
            viewModel = new MainWindowViewModel(logger,
                                                messageBoxService,
                                                dbService,
                                                versionChecker,
                                                scoreBoardService,
                                                camsDetectionBoard,
                                                drawService,
                                                detectionService,
                                                manualThrowPanel,
                                                gameService,
                                                configService);
            DataContext = viewModel;
        }
 public AboutTabViewModel(DataContext dataContext,
                          IDbService dbService,
                          ILogger logger,
                          IConfigService configService,
                          DrawService drawService,
                          IMessageBoxService messageBoxService,
                          CamsDetectionBoard camsDetectionBoard,
                          IDetectionService detectionService)
     : base(dataContext, dbService, logger, configService, drawService, messageBoxService, camsDetectionBoard, detectionService)
 {
 }
 public DetectionService(DrawService drawService,
                         ConfigService configService,
                         ThrowService throwService,
                         Logger logger,
                         CamsDetectionBoard camsDetectionBoard)
 {
     this.drawService        = drawService;
     this.configService      = configService;
     this.throwService       = throwService;
     this.logger             = logger;
     this.camsDetectionBoard = camsDetectionBoard;
 }
示例#4
0
 public GameService(ScoreBoardService scoreBoardService,
                    CamsDetectionBoard camsDetectionBoard,
                    DetectionService detectionService,
                    Logger logger,
                    DBService dbService)
 {
     this.logger             = logger;
     this.scoreBoardService  = scoreBoardService;
     this.camsDetectionBoard = camsDetectionBoard;
     this.detectionService   = detectionService;
     this.dbService          = dbService;
 }
 public GameService(ScoreBoardService scoreBoardService,
                    CamsDetectionBoard camsDetectionBoard,
                    DetectionService detectionService,
                    Logger logger,
                    DbService dbService,
                    ManualThrowPanel manualThrowPanel)
 {
     this.logger             = logger;
     this.scoreBoardService  = scoreBoardService;
     this.camsDetectionBoard = camsDetectionBoard;
     this.detectionService   = detectionService;
     this.dbService          = dbService;
     this.manualThrowPanel   = manualThrowPanel;
 }
 public PlayerTabViewModel(DataContext dataContext,
                           ILogger logger,
                           IConfigService configService,
                           DrawService drawService,
                           IDbService dbService,
                           IMessageBoxService messageBoxService,
                           CamsDetectionBoard camsDetectionBoard,
                           IDetectionService detectionService)
     : base(dataContext, dbService, logger, configService, drawService, messageBoxService, camsDetectionBoard, detectionService)
 {
     ChooseNewPlayerAvatarCommand = new ChooseNewPlayerAvatarCommand(SelectAvatarImage);
     SaveNewPlayerCommand         = new SaveNewPlayerCommand(SaveNewPlayer);
     PlayerStatisticsLoadCommand  = new PlayerStatisticsLoadCommand(PlayerStatisticsLoad);
 }
 public SettingsTabViewModel(DataContext dataContext,
                             IDbService dbService,
                             ILogger logger,
                             IConfigService configService,
                             DrawService drawService,
                             IMessageBoxService messageBoxService,
                             CamsDetectionBoard camsDetectionBoard,
                             IDetectionService detectionService)
     : base(dataContext, dbService, logger, configService, drawService, messageBoxService, camsDetectionBoard, detectionService)
 {
     CalibrateCamsSetupPointsCommand = new CalibrateCamsSetupPointsCommand(CalibrateCamsSetupPoints);
     CheckCamsCommand              = new CheckCamsCommand(CheckCamsSimultaneousWork);
     FindCamsCommand               = new FindCamsCommand(FindConnectedCams);
     StartRuntimeCrossingCommand   = new StartRuntimeCrossingCommand(StartCrossing);
     StopRuntimeCrossingCommand    = new StopRuntimeCrossingCommand(StopCrossing);
     StartCamSetupCapturingCommand = new StartCamSetupCapturingCommand(StartCamSetupCapturing);
     StopCamSetupCapturingCommand  = new StopCamSetupCapturingCommand(StopCamSetupCapturing);
 }
        protected TabViewModelBase(DataContext dataContext,
                                   IDbService dbService,
                                   ILogger logger,
                                   IConfigService configService,
                                   DrawService drawService,
                                   IMessageBoxService messageBoxService,
                                   CamsDetectionBoard camsDetectionBoard,
                                   IDetectionService detectionService)
        {
            DataContext             = dataContext;
            this.dbService          = dbService;
            this.logger             = logger;
            this.configService      = configService;
            this.drawService        = drawService;
            this.messageBoxService  = messageBoxService;
            this.camsDetectionBoard = camsDetectionBoard;
            this.detectionService   = detectionService;

            HyperLinkNavigateCommand = new HyperLinkNavigateCommand(OnHyperlinkNavigate);
        }
        public GameTabViewModel(DataContext dataContext,
                                IDbService dbService,
                                ILogger logger,
                                IConfigService configService,
                                DrawService drawService,
                                IMessageBoxService messageBoxService,
                                CamsDetectionBoard camsDetectionBoard,
                                IDetectionService detectionService,
                                GameService gameService,
                                ScoreBoardService scoreBoardService,
                                ManualThrowPanel manualThrowPanel)
            : base(dataContext, dbService, logger, configService, drawService, messageBoxService, camsDetectionBoard, detectionService)
        {
            this.gameService       = gameService;
            this.scoreBoardService = scoreBoardService;
            this.manualThrowPanel  = manualThrowPanel;

            StartNewGameCommand = new StartNewGameCommand(StartGame);
            StopGameCommand     = new StopGameCommand(StopGameByButton);
        }