public async Task LoadProcessedData() { ResourceLoader resourceLoader = new ResourceLoader(); await ProcessData.LoadSettings(); MembersHubViewModel OfficeMembers = new MembersHubViewModel(); OfficeMembers.HubName = resourceLoader.GetString(OFFICE_RESOURCE_KEY); List<OfficeMember> OfficeMembersModelsList = ProcessData.GetOfficeMembers(); foreach (OfficeMember officeMemberModel in OfficeMembersModelsList) { MemberItemViewModel officeMemberItem = new MemberItemViewModel(); officeMemberItem.ModelToItem(officeMemberModel); OfficeMembers.Add(officeMemberItem); } this.Hubs.Add(OfficeMembers); MembersHubViewModel Members = new MembersHubViewModel(); Members.HubName = resourceLoader.GetString(MEMBERS_RESOURCE_KEY); List<Member> MembersModelsList = ProcessData.GetMembers(); foreach (Member MemberModel in MembersModelsList) { MemberItemViewModel MemberItem = new MemberItemViewModel(); MemberItem.ModelToItem(MemberModel); Members.Add(MemberItem); } this.Hubs.Add(Members); }
public void LoadSampleData() { string[] tempHubNames = { "Office", "Members" }; for (int i = 0; i < 2; i++) { MembersHubViewModel tempHub = new MembersHubViewModel(); tempHub.HubName = tempHubNames[i]; for (int j = 0; j < 4; j++) { MemberItemViewModel tempItem = new MemberItemViewModel(); tempItem.Image = "/Content/Images/Members/default.png"; tempItem.Title = "John Doe " + j; tempItem.Subtitle = " Joined on 22/12/2012"; tempHub.Add(tempItem); } this.Hubs.Add(tempHub); } }