예제 #1
0
        public void Start(Action closeAppMethod)
        {
            _closeAppMethod = closeAppMethod;

            _log           = LogManager.GetLogger("MyLog");
            _updateHandler = new SelfUpdateHandler(_log);

            new Thread(RunManager).Start();
        }
        public MissionsManager(ILog logger, SelfUpdateHandler updateHandler, DAL dal, Configuration conf, Action closeAppMethod)
        {
            _log            = logger;
            _updateHandler  = updateHandler;
            _dal            = dal;
            _conf           = conf;
            _closeAppMethod = closeAppMethod;

            _mainTimer         = new Timer(GetMission, null, Timeout.Infinite, Timeout.Infinite);
            _filesLocatorTimer = new Timer(CheckHd, null, Timeout.Infinite, Timeout.Infinite);
            _deleteFileAndStartExperimentTimer = new Timer(StartExperiment, null, Timeout.Infinite, Timeout.Infinite);
            _updateTimer = new Timer(UpdateInMiddleOfExperiment, null, Timeout.Infinite, Timeout.Infinite);
        }