private void ShowPerson_Click(object sender, RoutedEventArgs e) { var anyaItem = RequestBox.SelectedItem as User; if (anyaItem == null) { MessageBox.Show("Choose a request"); return; } var anya = new FriendProfileWindow(anyaItem); anya.ShowDialog(); }
private void ShowFriend_Click(object sender, RoutedEventArgs e) { if (FriendsBox.SelectedItem == null) { MessageBox.Show("Select a friend"); return; } var cf = new FriendProfileWindow(User); if (cf.ShowDialog() == true) { UpdateWindow(); } }