public static MatchingResultFormManager GetInstanse(User io_LoggedInUser)
        {
            if (s_Instance == null)
            {
                lock (s_LockObj)
                {
                    if (s_Instance == null)
                    {
                        s_Instance = new MatchingResultFormManager(io_LoggedInUser);
                    }
                }
            }

            return(s_Instance);
        }
 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));
     }
 }