public ConnectionProfile(UserInfoWithAvatar connection) { var viewModel = new ConnectionProfileViewModel(connection); BindingContext = viewModel; InitializeComponent(); }
public void ViewMessagesForSelectedMatch(UserInfoWithAvatar match) { Messages.Clear(); if (match != null) { AllMessagesForUser.Where(m => m.SenderId == match.UserInfo.User.UserId || m.RecipientId == match.UserInfo.User.UserId) .OrderBy(m => m.LastUpdateTime).ToList().ForEach(m => Messages.Add(m)); } }
public ConnectionProfileViewModel(UserInfoWithAvatar userProfile) { AcademicInterests = new ObservableCollection <AcademicInterest>(userProfile.UserInfo.AcademicInterests); ProfileName = userProfile.UserInfo.User.Username; FullName = userProfile.UserInfo.User.FullName; IsMentor = userProfile.UserInfo.User.UserType.ToLower().Equals("teacher"); IsStudent = !IsMentor; IsCurrentUserMentor = UserInfo.User.UserType.ToLower().Equals("teacher"); IsCurrentUserStudent = !IsCurrentUserMentor; University = userProfile.UserInfo.User.University; Classification = userProfile.UserInfo.User.UserType; EducationLevel = userProfile.UserInfo.User.EducationLevel; AvatarImage = userProfile.AvatarImage; }
public void ViewMentorProfile(UserInfoWithAvatar mentorToView) { OnViewMentorProfile(mentorToView); }
public void AddConnection(UserInfoWithAvatar mentor) { OnAddConnection(mentor); }
public void RespondToNotification(UserInfoWithAvatar notificationUserInfo) { OnRespondToNotification(notificationUserInfo.UserInfo.User.UserId, notificationUserInfo.UserInfo.User.Username); }
public void ViewProfile(UserInfoWithAvatar connection) { OnViewConnectionProfile(connection); }