Example #1
0
        /// <summary>
        /// On Get
        /// </summary>
        public void OnGet()
        {
            SetButtonState(ButtonPress.Home);
            if (firstTime)
            {
                MonitorDataRepository.GetIniFileData();
                MonitorDataRepository.CheckLogFileHistory();
                firstTime = false;
            }
            else
            {
                SetButtonState(ButtonPress.Start);
            }

            StatusData = MonitorDataRepository.GetJobStatus().Reverse();
            if (StatusData == null)
            {
                Logger.LogError("OnPostHistoryButton StatusData return null");
            }
        }
        /// <summary>
        /// On Get
        /// </summary>
        public void OnGet()
        {
            SetButtonState(ButtonPress.Home);
            if (FirstTime)
            {
                string          currentDir    = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
                FileVersionInfo fvi           = FileVersionInfo.GetVersionInfo(Path.Combine(currentDir, "Handler.exe"));
                string          VersionNumber = fvi.ProductVersion.ToString();
                MonitorDataRepository.GetIniFileData(VersionNumber);
                MonitorDataRepository.CheckLogFileHistory();
                FirstTime = false;
            }
            else
            {
                SetButtonState(ButtonPress.Start);
            }

            StatusData = MonitorDataRepository.GetJobStatus().Reverse();
            if (StatusData == null)
            {
                Logger.LogError("OnGet StatusData return null");
            }
        }