Пример #1
0
 public static void InitializePersonalProjects(this ITashaPerson person)
 {
     //Work | School | IndividualOther | IndividualMarket
     SchedulerPersonData data;
     person.Attach( "SData", data = new SchedulerPersonData() );
     ProjectSchedule workSchedule = new ProjectSchedule( person.Household );
     ProjectSchedule schoolSchedule = new ProjectSchedule( person.Household );
     ProjectSchedule otherSchedule = new ProjectSchedule( person.Household );
     ProjectSchedule marketSchedule = new ProjectSchedule( person.Household );
     // We could just call the other methods, but this will run much faster
     data.WorkSchedule = new PersonalProject( workSchedule, person );
     data.SchoolSchedule = new PersonalProject( schoolSchedule, person );
     data.OtherSchedule = new PersonalProject( otherSchedule, person );
     data.MarketSchedule = new PersonalProject( marketSchedule, person );
     data.Schedule = new PersonSchedule( person );
 }
Пример #2
0
 internal static void CreateHouseholdProjects(this ITashaHousehold household)
 {
     SchedHouseholdData data;
     household.Attach("SData", data = new SchedHouseholdData());
     ProjectSchedule jointOtherSchedule = new ProjectSchedule(household);
     ProjectSchedule jointMarketSchedule = new ProjectSchedule(household);
     Project jointOtherProject = new HouseholdProject(household, jointOtherSchedule);
     Project jointMarketProject = new HouseholdProject(household, jointMarketSchedule);
     data.JointOtherProject = jointOtherProject;
     data.JointMarketProject = jointMarketProject;
 }