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 MainWindow() { logger.Info($"\n\nApp start"); telemetryWriter.WriteAppStart(); InitializeComponent(); RegisterContainer(); viewModel = new MainWindowViewModel(this); DataContext = viewModel; }