public void editUser(User u) { EditView e = new EditView(u, RealData.getPostsFromUser(u).ToList()); e.ShowDialog(); if (e.save) { if (e.userEditor.validate()) { u.Username = e.userEditor.username.Text; u.Image = e.userEditor.image.Text; u.Handle = e.userEditor.handle.Text; if (RealData.editUser(u)) { MessageBox.Show("saved"); } } } }
public void showUsersPosts(User u) { postList.Posts.ItemsSource = RealData.getPostsFromUser(u); }