public void ShowAlbum(object sender, EventArgsSelectedItem e) { closeSimilarForm <FormAlbum>(); AdapterFacebookAlbum adapter = e.Item as AdapterFacebookAlbum; FormAlbum displayForm = new FormAlbum(adapter.Album); displayForm.Show(); }
private void preformFunctionOnSelectedItem(ListBox i_ListBox, SelectedItemEventHandler i_Event) { if (i_ListBox.SelectedItem != null) { EventArgsSelectedItem args = new EventArgsSelectedItem(); args.Item = i_ListBox.SelectedItem as AdapterFacebookObject; i_Event(this, args); } else { MessageBox.Show(k_FriendChoiceMsg); } }
public void GetChuckNorris(object sender, EventArgsSelectedItem e) { string joke = string.Empty; closeSimilarForm <FormChuckNorrisJoke>(); if (AppSevices.FetchChuckNorrisJoke(out joke)) { User selectedFriend = (e.Item as AdapterFacebookUser).User; FormChuckNorrisJoke jokeForm = new FormChuckNorrisJoke(selectedFriend, joke); jokeForm.Show(); } else { MessageBox.Show(k_FetchDataErrorMsg); } }
public void FindFriendZodiac(object sender, EventArgsSelectedItem e) { string zodiacResult = string.Empty; closeSimilarForm <FormUserZodiac>(); User selectedFriend = (e.Item as AdapterFacebookUser).User; if (AppSevices.FetchZodiacSign(selectedFriend, out zodiacResult)) { FormUserZodiac zodiacForm = new FormUserZodiac(zodiacResult); zodiacForm.Show(); } else { MessageBox.Show(k_FetchDataErrorMsg); } }