using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Project
{
    public class CResult
    {
        public enum eResult
        {
            NG = 0,
            OK,
            NOTSET,
            ERROR,
        }

        //commmon
        public Manager.sModelInfo ModelInfo;
        public string Message;
        public eResult Judg;
        public DateTime JobStart;
        public DateTime JobEnd;
        public TimeSpan JobTime { 
            get {
                if (JobStart.Year == 1982) return new TimeSpan();
                if (JobEnd.Year == 1982) return DateTime.Now - JobStart;
                else return JobEnd - JobStart;
            }
        }
        
        public CResult()
        {
            this.Clear();
        }
        public void Clear()
        {
            ModelInfo.Clear();
            Message = string.Empty;
            Judg = eResult.NOTSET;
            JobStart = DateTime.Parse("1982-11-23");
            JobEnd = JobStart;
        }

    }
}
