private void displayMatchingResultForm() { try { User SelectedFriend = listBoxCommonFriends.SelectedItem as User; MatchingResultFormManager MatchingResultManager = MatchingResultFormManager.GetInstanse(LoggedInUser); MatchingResultManager.FriendUser = SelectedFriend; if (SelectedFriend != null) { MatchingResultManager.DisplayMatchingResultForm(); } else { MessageBox.Show("You didn't select any friend"); } } catch (Exception e) { MessageBox.Show(string.Format( @"Error detected: {0}", e.Message)); } }