Пример #1
0
        public MainManager(ILogger logger, LoopManager loopManager, DeviceManager deviceManager,
            EffectManager effectManager, ProfileManager profileManager, PipeServer pipeServer)
        {
            Logger = logger;
            LoopManager = loopManager;
            DeviceManager = deviceManager;
            EffectManager = effectManager;
            ProfileManager = profileManager;
            PipeServer = pipeServer;

            _processTimer = new Timer(1000);
            _processTimer.Elapsed += ScanProcesses;
            _processTimer.Start();

            ProgramEnabled = false;
            Running = false;

            // Create and start the web server
            GameStateWebServer = new GameStateWebServer(logger);
            GameStateWebServer.Start();

            // Start the named pipe
            PipeServer.Start("artemis");

            // Start the update task
            var updateTask = new Task(Updater.UpdateApp);
            updateTask.Start();

            Logger.Info("Intialized MainManager");
            Logger.Info($"Artemis version {Assembly.GetExecutingAssembly().GetName().Version} is ready!");
        }
Пример #2
0
        public GamesViewModel(GameViewModel[] gameViewModels, ProfileManager profileManager,
            ProfilePreviewModel profilePreviewModel)
        {
            DisplayName = "Games";
            _gameViewModels = gameViewModels;

            profileManager.ProfilePreviewModel = profilePreviewModel;
            profileManager.GameViewModels.AddRange(_gameViewModels);
        }