コード例 #1
0
ファイル: AddEmployments.cs プロジェクト: ZirockZ/PathPointer
        private void SetDisign()
        {
            EmploymentsBusiness business = new EmploymentsBusiness();
            EmploymentsGoals    goals    = new EmploymentsGoals();
            EmploymentsRest     rest     = new EmploymentsRest();
            EmploymentsFun      fun      = new EmploymentsFun();

            BtnBusiness.BackColor = business.CellColor;
            BtnGoals.BackColor    = goals.CellColor;
            BtnRest.BackColor     = rest.CellColor;
            BtnFun.BackColor      = fun.CellColor;
        }
コード例 #2
0
        public static Employments GetEmploymentType(string employmentLine)
        {
            string                 empType        = Management.GetValueByIndex(employmentLine);
            string                 code           = Management.GetValueByIndex(employmentLine, 1);
            Employments            employment     = null;
            IEmploymentsOtherTypes employmentType = null;

            switch (code)
            {
            case Codes.anotherEmpCode:
                employmentType = new EmploymentsTypeOther();
                break;

            case Codes.sleep:
                employmentType = new EmploymentsTypeSleep();
                break;
            }

            switch (empType)
            {
            case "Business":
                employment = new EmploymentsBusiness(employmentType);
                break;

            case "Goals":
                employment = new EmploymentsGoals(employmentType);
                break;

            case "Rest":
                employment = new EmploymentsRest(employmentType);
                break;

            case "Fun":
                employment = new EmploymentsFun(employmentType);
                break;
            }

            employment.SetEmploymentValuesByCode(code);
            return(employment);
        }