Beispiel #1
0
        /// <summary>
        /// Updates status file
        /// (Overload to update file when status and completion percentage change)
        /// </summary>
        /// <param name="status">Job status enum</param>
        /// <param name="percentComplete">Job completion percentage (value between 0 and 100)</param>
        // ReSharper disable once UnusedMember.Global
        public void UpdateAndWrite(EnumTaskStatusDetail status, float percentComplete)
        {
            TaskStatusDetail = status;
            Progress         = percentComplete;

            WriteStatusFile();
        }
 /// <summary>
 /// Converts the manager status enum to a string value
 /// </summary>
 /// <param name="StatusEnum">An IStatusFile.EnumTaskStatusDetail object</param>
 /// <returns>String representation of input object</returns>
 private string ConvertTaskDetailStatusToString(EnumTaskStatusDetail StatusEnum)
 {
     return StatusEnum.ToString("G");
 }
        /// <summary>
        /// Sets status file to show mahager not running
        /// </summary>
        /// <param name="MgrError">TRUE if manager not running due to error; FALSE otherwise</param>
        public void UpdateStopped(bool MgrError)
        {
            ClearCachedInfo();

            if (MgrError)
            {
                m_MgrStatus = EnumMgrStatus.Stopped_Error;
            }
            else
            {
                m_MgrStatus = EnumMgrStatus.Stopped;
            }

            m_TaskStatus = EnumTaskStatus.No_Task;
            m_TaskStatusDetail = EnumTaskStatusDetail.No_Task;

            WriteStatusFile();
        }
        /// <summary>
        /// Updates status file to show manager in idle state
        /// </summary>
        public void UpdateIdle()
        {
            ClearCachedInfo();

            m_MgrStatus = EnumMgrStatus.Running;
            m_TaskStatus = EnumTaskStatus.No_Task;
            m_TaskStatusDetail = EnumTaskStatusDetail.No_Task;

            WriteStatusFile();
        }
        /// <summary>
        /// Updates status file to show manager disabled
        /// </summary>
        /// <param name="Local">TRUE if manager disabled locally, otherwise FALSE</param>
        public void UpdateDisabled(bool Local)
        {
            ClearCachedInfo();

            if (Local)
            {
                m_MgrStatus = EnumMgrStatus.Disabled_Local;
            }
            else
            {
                m_MgrStatus = EnumMgrStatus.Disabled_MC;
            }

            m_TaskStatus = EnumTaskStatus.No_Task;
            m_TaskStatusDetail = EnumTaskStatusDetail.No_Task;

            this.WriteStatusFile();
        }
        /// <summary>
        /// Updates status file
        /// (Overload to update file when status and completion percentage change)
        /// </summary>
        /// <param name="Status">Job status enum</param>
        /// <param name="PercentComplete">Job completion percentage (value between 0 and 100)</param>
        public void UpdateAndWrite(EnumTaskStatusDetail Status, float PercentComplete)
        {
            m_TaskStatusDetail = Status;
            m_Progress = PercentComplete;

            WriteStatusFile();
        }
Beispiel #7
0
 /// <summary>
 /// Converts the task status enum to a string value
 /// </summary>
 /// <param name="statusEnum">An IStatusFile.EnumTaskStatusDetail object</param>
 /// <returns>String representation of input object</returns>
 private string ConvertTaskStatusDetailToString(EnumTaskStatusDetail statusEnum)
 {
     return(statusEnum.ToString("G"));
 }