public void FetchPosts() { r_FormToPopulate.ListBoxPosts.Invoke(new Action(() => r_FormToPopulate.ListBoxPosts.DisplayMember = "Message")); r_FormToPopulate.ListBoxPosts.Invoke(new Action(() => r_FormToPopulate.ListBoxPosts.Items.Clear())); try { foreach (PostAdapter post in r_FormToPopulate.LoginResult.LoggedInUser.Posts) { if (post.Message != null) { r_FormToPopulate.ListBoxPosts.Invoke(new Action(() => r_FormToPopulate.ListBoxPosts.Items.Add(post))); } } } catch (Exception Exception) { r_FormToPopulate.DisplayErrorDialog(string.Format("Something went wrong in showing your posts \n Advanced:{0}", Exception.Message)); } }
public void PopulateUI() { try { m_FetcherHolder.FetchAvatarAndTitle(); m_FetcherHolder.FetchAlbums(); m_FetcherHolder.FetchFriends(); m_FetcherHolder.FetchPosts(); } catch (Exception e) { r_FormToPopulate.DisplayErrorDialog(string.Format("Something went wrong in showing your details:{0} Advanced:{1}", Environment.NewLine, e.Message)); } }
public void PopulateUI() { try { fetchAvatarAndTitle(); fetchAlbums(); fetchFriends(); fetchPosts(); } catch (Exception e) { m_FormToPopulate.DisplayErrorDialog(string.Format("Something went wrong in showing your details:{0}", e.Message)); } }