예제 #1
0
        public void ShowAlbum(object sender, EventArgsSelectedItem e)
        {
            closeSimilarForm <FormAlbum>();
            AdapterFacebookAlbum adapter     = e.Item as AdapterFacebookAlbum;
            FormAlbum            displayForm = new FormAlbum(adapter.Album);

            displayForm.Show();
        }
예제 #2
0
 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);
     }
 }
예제 #3
0
        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);
            }
        }
예제 #4
0
        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);
            }
        }