示例#1
0
        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");
                    }
                }
            }
        }
示例#2
0
 public void showUsersPosts(User u)
 {
     postList.Posts.ItemsSource = RealData.getPostsFromUser(u);
 }