private void PostItem(string i_Title, string i_Path) { FacebookPost.ePostType ePostType = (FacebookPost.ePostType)tabControlPostItems.SelectedIndex; FacebookPost itemToPost = FacebookPostFactory.CreateFacebookPost(ePostType, i_Title, i_Path, m_DataManager); try { itemToPost.Post(); MessageBox.Show(ePostType.ToString() + " Posted successfully!"); } catch { MessageBox.Show("Something went wrong... Can't post the " + ePostType.ToString() + " :("); } }