void client_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         ResponseApi api = ResponseApi.GetResponseApiFrom(e.Result);
         if (api.isSuccess())
         {
             foreach (Result r in user.friends)
             {
                 if (r.pseudo == NameFriend.Text)
                 {
                     r.lon          = api.results.lon;
                     r.lat          = api.results.lat;
                     latFriend.Text = r.lat.ToString();
                     lonFriend.Text = r.lon.ToString();
                 }
             }
         }
         else
         {
             MessageBox.Show(api.ToString());
         }
     }
     else
     {
         MessageBox.Show("the Friend with name " + NameFriend.Text + " does not exist");
     }
 }
        void update_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                progressbar.Value      = 100;
                progressbar.Visibility = Visibility.Collapsed;

                ResponseApi api = ResponseApi.GetResponseApiFrom(e.Result);
                if (!api.isSuccess())
                {
                    MessageBox.Show(api.ToString());
                }
                else
                {
                    //MessageBox.Show(api.ToString());
                }
            }
            else
            {
                progressbar.Value = 25;
                MessageBoxResult msg_box = MessageBox.Show(e.Error.Message + "Server Does Not Response", "Do you want to Retry", MessageBoxButton.OKCancel);
                if (msg_box == MessageBoxResult.OK)
                {
                    search();
                }
            }
        }