Exemplo n.º 1
0
        public XMLDataImportManager(
            ILogger <XMLDataImportManager> logger,
            IKeyProcessor keyProcessor,
            IConfiguration configuration,
            IServiceScopeFactory serviceScopeFactory)
        {
            _logger       = logger;
            _keyProcessor = keyProcessor;
            var cfg = configuration.GetSection("DataImportFolder");

            if (cfg != null)
            {
                if (!string.IsNullOrEmpty(cfg.GetValue <string>("Incoming")) &&
                    !string.IsNullOrEmpty(cfg.GetValue <string>("Success")) &&
                    !string.IsNullOrEmpty(cfg.GetValue <string>("Failure")))
                {
                    _incomingFolder = new DirectoryInfo(cfg.GetValue <string>("Incoming"));
                    _successFolder  = new DirectoryInfo(cfg.GetValue <string>("Success"));
                    _failureFolder  = new DirectoryInfo(cfg.GetValue <string>("Failure"));
                }
            }

            _ccliNumber          = configuration.GetValue <string>("CCLINumber");
            _serviceScopeFactory = serviceScopeFactory;
        }
Exemplo n.º 2
0
 public Analyzer(ILogger <Analyzer> logger,
                 IConfiguration config,
                 IGlobalKeyboardHook hook,
                 IActiveWindowHandler windowHandler,
                 IKeyProcessor processor,
                 IEnumerable <IKeyReporter> reporters)
 {
     _logger        = logger;
     _config        = config;
     _windowHandler = windowHandler;
     _hook          = hook;
     _processor     = processor;
     _reporters     = reporters;
 }
Exemplo n.º 3
0
        public GameManager(MapView mapView, GameService service, ListBoxLogger listBoxLogger)
        {
            this.gameService  = service;
            this.window       = mapView;
            this.keyProcessor = new MainKeyProcessor(this);
            //MapLoader loader = new MapLoader();
            //char[,] initialMap = loader.loadMap("TestMap.map");
            AbstractLogger.Current = listBoxLogger;
            //this.gameService.InitializeGame(initialMap);
            this.mapDrawer = new MapDrawer(window.GridMap, 15, 20, this.gameService.Map);

            UpdateScreenMap();
            UpdateGui();
        }
		public GameManager(MapView mapView, GameService service, ListBoxLogger listBoxLogger)
		{
			this.gameService = service;
			this.window = mapView;
			this.keyProcessor = new MainKeyProcessor(this);
			//MapLoader loader = new MapLoader();
			//char[,] initialMap = loader.loadMap("TestMap.map");
			AbstractLogger.Current = listBoxLogger;
			//this.gameService.InitializeGame(initialMap);
			this.mapDrawer = new MapDrawer(window.GridMap, 15, 20, this.gameService.Map);

			UpdateScreenMap();
			UpdateGui();
		}
 public void PushNextFrame(IKeyProcessor newProcessor)
 {
     DataContext           = newProcessor;
     this.currentProcessor = newProcessor;
     this.currentProcessor.SetupHost(this);
 }
Exemplo n.º 6
0
 public KeyStatsReporter(ILogger <KeyStatsReporter> logger, IConfiguration config, IKeyProcessor processor) : base(processor)
 {
     _logger    = logger;
     _config    = config;
     _statsFile = _config.GetValue("Reporting:KeyStatsFile", "KeyStats.xml");
 }
Exemplo n.º 7
0
 public ContinuousStreamReporter(ILogger <ContinuousStreamReporter> logger, IConfiguration config, IKeyProcessor processor) : base(processor)
 {
     _logger     = logger;
     _config     = config;
     _streamFile = _config.GetValue("Reporting:ContinuousStreamFile", "KeyStream.txt");
 }
Exemplo n.º 8
0
 public void PlayerCommand(ICreatureCommand playerCommand)
 {
     gameService.NextTurn(playerCommand);
     UpdateScreenMap();
     this.KeyProcessor = new MainKeyProcessor(this);
 }
		public void PlayerCommand(ICreatureCommand playerCommand)
		{
			gameService.NextTurn(playerCommand);
			UpdateScreenMap();
			this.KeyProcessor = new MainKeyProcessor(this);
		}
Exemplo n.º 10
0
 public KeyReporter(IKeyProcessor processor)
 {
     _processor          = processor;
     _keyPressBlock      = new ActionBlock <KeyData>(ReportKeyData);
     _completedWordBlock = new ActionBlock <CompletedWord>(ReportCompletedWord);
 }