Esempio n. 1
0
        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;
        }
Esempio n. 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);
        }