Exemple #1
0
        public ActionResult Index()
        {
            OptionsHelper.ReloadOptions();
            if (_resourcesStatusModel == null)
            {
                _resourcesStatusModel = new ResourcesStatusModel();
            }
            else
            {
                _resourcesStatusModel.IsFirstIntervalChanging = true;
            }

            if (_timer == null)
            {
                _resourcesStatusModel.Initialize();
                CheckStatus(_resourcesStatusModel);
                this._isFirstTime = false;
                _timer            = new System.Threading.Timer(CheckStatus, _resourcesStatusModel, FIRST_TIME_DELAY_MS, Timeout.Infinite);
            }
            return(View());
        }