public SocialDataSource Initialize() { dataSource = dataSource ?? new SocialDataSource(); activityFeedGroup = activityFeedGroup ?? new SocialDataGroup("SocialFeed", "Activity Feed", "Social Data from Activity Feed", "Assets/social.png", "Group Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor scelerisque lorem in vehicula. Aliquam tincidunt, lacus ut sagittis tristique, turpis massa volutpat augue, eu rutrum ligula ante a ante"); announcementsGroup = announcementsGroup ?? new SocialDataGroup("Announcements", "Announcements", "Announcements announcingly made", "Assets/announcement.png", "Group Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor scelerisque lorem in vehicula. Aliquam tincidunt, lacus ut sagittis tristique, turpis massa volutpat augue, eu rutrum ligula ante a ante"); submissionsGroup = submissionsGroup ?? new SocialDataGroup("Submissions", "Submissions", "Submissions subtitle", "Assets/dropbox.png", "Group Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor scelerisque lorem in vehicula. Aliquam tincidunt, lacus ut sagittis tristique, turpis massa volutpat augue, eu rutrum ligula ante a ante" ); gmailGroup = gmailGroup ?? new SocialDataGroup("Gmail", "Gmail", "Check Your Mail Dude!", "Assets/Gmail logo.png", "Group Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor scelerisque lorem in vehicula. Aliquam tincidunt, lacus ut sagittis tristique, turpis massa volutpat augue, eu rutrum ligula ante a ante"); yourMomGroup = yourMomGroup ?? new SocialDataGroup("YourMom", "Your Mom", "Your mom wants you to come home for dinner", "Assets/yourmom.png", "Group Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor scelerisque lorem in vehicula. Aliquam tincidunt, lacus ut sagittis tristique, turpis massa volutpat augue, eu rutrum ligula ante a ante"); examsGroup = examsGroup ?? new SocialDataGroup( "Exams", "Exams", "Exams Subtitle", "Assets/exams.png", "Exams that are very social" ); eventsGroup = eventsGroup ?? new SocialDataGroup( "Events", "Events", "Events subtitle", "Assets/events.png", "Events that are very event like" ); dataSource.AllGroups.Add(activityFeedGroup); dataSource.AllGroups.Add(announcementsGroup); dataSource.AllGroups.Add(submissionsGroup); dataSource.AllGroups.Add(examsGroup); dataSource.AllGroups.Add(gmailGroup); dataSource.AllGroups.Add(eventsGroup); dataSource.AllGroups.Add(yourMomGroup); yourMomGroup.Items.Add(new SocialDataItem("Group-4-Item-1", "Please come home", "sub title come home", "Assets/DarkGray.png", "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.", ITEM_CONTENT, yourMomGroup)); return dataSource; }
private static void UpdateCount(string name, SocialDataSource source, ref int count, List<SocialDataGroup> list) { var group = source.AllGroups.FirstOrDefault(g => g.UniqueId.Contains(name)); if (group == null) { return; } if (group.UnreadCount > 0 && count != group.Items.Count) { list.Add(group); } count = group.Items.Count; }