Ejemplo n.º 1
0
 private void initializeFriendInfo()
 {
     m_FriendDataManager = new FacebookAppDataManager(m_CurrectFriend);
     pictureBoxFriendPhoto.Invoke(new Action(() => pictureBoxFriendPhoto.LoadAsync(m_FriendDataManager.ProfilePicURL)));
     initializeQuestions();
     buttonSubmit.Invoke(new Action(() => buttonSubmit.Enabled = true));
 }
 public FormMemories(FacebookAppDataManager i_DataManager, FormFacebookApplication i_FbAppFormToReturn)
 {
     InitializeComponent();
     m_DataManager       = i_DataManager;
     m_MemoriesSearch    = new MemoriesSearch();
     m_FbAppFormToReturn = i_FbAppFormToReturn;
 }
Ejemplo n.º 3
0
 public FormFetchAlbums(FacebookAppDataManager i_DataManager)
 {
     InitializeComponent();
     m_DataManager             = i_DataManager;
     m_ListOfImages            = new ImageList();
     m_ListOfImages.ImageSize  = new Size(64, 64);
     m_ListOfImages.ColorDepth = ColorDepth.Depth32Bit;
     fetchAlbums();
 }
Ejemplo n.º 4
0
 public FormFriendshipTestQuestion(User i_Friend, FormFriendshipTest i_FriendshipForm, FacebookAppDataManager i_UserDateManager, IFriendshipTestInitializer i_FriendshipTester)
 {
     InitializeComponent();
     m_UserDataManager       = i_UserDateManager;
     m_CurrectFriend         = i_Friend;
     m_FriendshipTester      = i_FriendshipTester;
     m_FriendshipTestForm    = i_FriendshipForm;
     m_ListOfQuestionListBox = new CheckedListBox[] { checkedListBoxQuestion1, checkedListBoxQuestion2, checkedListBoxQuestion3, checkedListBoxQuestion4, checkedListBoxQuestion5, checkedListBoxQuestion6 };
     new Thread(initializeFriendInfo).Start();
 }
        public QuestionsInitializer[] InitializeQuestions(FacebookAppDataManager i_DataManager)
        {
            QuestionsInitializer[] questionsFormToReturn = new QuestionsInitializer[k_NumberOfQuestions];

            questionsFormToReturn[0] = new QuestionsInitializer(i_DataManager.UserAge);

            if (i_DataManager.UserPostsList != null)
            {
                questionsFormToReturn[1] = new QuestionsInitializer(i_DataManager.UserPostsList[0].CreatedTime.Value.Date);
            }
            else
            {
                questionsFormToReturn[1] = new QuestionsInitializer();
            }

            if (i_DataManager.UserAlbums != null)
            {
                questionsFormToReturn[2] = new QuestionsInitializer(i_DataManager.UserAlbums.Count);
            }
            else
            {
                questionsFormToReturn[2] = new QuestionsInitializer();
            }

            if (!string.IsNullOrEmpty(i_DataManager.UserLocation))
            {
                questionsFormToReturn[3] = new QuestionsInitializer(i_DataManager.UserLocation, r_ListOfCities);
            }
            else
            {
                questionsFormToReturn[3] = new QuestionsInitializer("Not declare", r_ListOfCities);
            }

            questionsFormToReturn[4] = new QuestionsInitializer(i_DataManager.UserMonthOfBirth.ToString(), r_ListOfMonth);

            if (i_DataManager.UserFriends != null)
            {
                questionsFormToReturn[5] = new QuestionsInitializer(i_DataManager.UserFriends.Count);
            }
            else
            {
                questionsFormToReturn[5] = new QuestionsInitializer();
            }

            QuestionsForm = questionsFormToReturn;
            CurrentUser   = i_DataManager.LoggedInUser;

            return(questionsFormToReturn);
        }
        public QuestionsInitializer[] InitializeQuestions(FacebookAppDataManager i_FriendDataManager)
        {
            QuestionsInitializer[] questionsFormToReturn;

            if (m_CachedFriendshipTestValues != null && m_CachedFriendshipTestValues.ContainsKey(CurrentUser.Id))
            {
                questionsFormToReturn = m_CachedFriendshipTestValues[CurrentUser.Id];
            }
            else
            {
                questionsFormToReturn = m_FriendshipTester.InitializeQuestions(i_FriendDataManager);
                saveFriendshipQuestionsToCache(i_FriendDataManager.UserId, questionsFormToReturn);
            }

            return(questionsFormToReturn);
        }
Ejemplo n.º 7
0
 public FacebookLink(string i_LinkTitle, string i_LinkPath, FacebookAppDataManager i_DataManager) : base(i_LinkTitle, i_DataManager)
 {
     LinkPath = i_LinkPath;
 }
Ejemplo n.º 8
0
 public FormFriendshipTest(FacebookAppDataManager i_DataManager, FormFacebookApplication i_FBAFormToReturn)
 {
     InitializeComponent();
     m_DataManager             = i_DataManager;
     m_FacebookAppFormToReturn = i_FBAFormToReturn;
 }
 public FacebookStatus(string i_StatusText, FacebookAppDataManager i_DataManager) : base(i_StatusText, i_DataManager)
 {
 }
        public static FacebookPost CreateFacebookPost(FacebookPost.ePostType i_PostType, string i_Title, string i_Path, FacebookAppDataManager i_DataManager)
        {
            FacebookPost facebookPostToReturn = null;

            switch (i_PostType)
            {
            case FacebookPost.ePostType.Status:
                facebookPostToReturn = new FacebookStatus(i_Title, i_DataManager);
                break;

            case FacebookPost.ePostType.Photo:
                facebookPostToReturn = new FacebookPhoto(i_Title, i_Path, i_DataManager);
                break;

            case FacebookPost.ePostType.Link:
                facebookPostToReturn = new FacebookLink(i_Title, i_Path, i_DataManager);
                break;
            }

            return(facebookPostToReturn);
        }
Ejemplo n.º 11
0
 public FacebookPost(string i_PostTitle, FacebookAppDataManager i_DataManager)
 {
     PostTitle   = i_PostTitle;
     DataManager = i_DataManager;
 }
 public FacebookPhoto(string i_PhotoTitle, string i_PhotoPath, FacebookAppDataManager i_DataManager) : base(i_PhotoTitle, i_DataManager)
 {
     PhotoPath = i_PhotoPath;
 }
 private void initializeDataManager()
 {
     m_DataManager = new FacebookAppDataManager();
     m_DataManager.AttachObserver(this as IDataInitializeObserver);
     m_DataManager.InitializeUserData(m_LoggedInUser);
 }