void HandleNewMeetings(Object sender, GetMeetingCompletedEventArgs e) { string name = string.Empty; if (e.Result.Meeting != null) { foreach (var user in e.Result.Meeting.Users.Where(user => user.phoneNumber != ServiceHelper.instance.localPhoneNumber)) { ServiceHelper.instance.targetPhoneNumber = user.phoneNumber; ServiceHelper.instance.targetUserID = user.userId; name = user.phoneNumber; } ServiceHelper.instance.currentMeeting = e.Result.Meeting; InvokeOnMainThread(delegate() { this.NavigationController.PresentModalViewController(new ShowViewController(name, this.NavigationController), true); }); } else { InvokeOnMainThread(delegate() { using (UIAlertView alert = new UIAlertView("iMeet", "No Meetings Found", null, "OK", null)) { alert.Show(); } }); } }
public void getMeeting(object sender, GetMeetingCompletedEventArgs e) { //try { if (e.Result.Meeting == null) { MessageHelper.showErrorMesage("Could not find the current meeting!"); } else { doUpdate(); } //} catch (Exception ex) { // MessageHelper.showErrorMesage ("getMeeting " + ex.Message); //} }
void getMeetingByPhoneData(object sender, GetMeetingCompletedEventArgs e) { if (e.Result.Meeting != null) { if (this.localuserID != Guid.Empty && e.Result.Meeting.Users.Count() > 0) { foreach (var user in e.Result.Meeting.Users) { if (user.userId != this.localuserID) { this.targetUserID = user.userId; this.targetPhoneNumber = user.phoneNumber; } } } } if (e.Result.Meeting != null) { this.currentMeeting = e.Result.Meeting; } callgetMeetingDelegate(sender, e); }
void HandleNewMeetings(Object sender, GetMeetingCompletedEventArgs e) { //List<string> numbers = new List<string>(); foreach (var user in e.Result.Meeting.Users.Where(user => user.phoneNumber != ServiceHelper.instance.localPhoneNumber)) { //numbers.Add(user.phoneNumber); //add all contacts phones, not user ServiceHelper.instance.targetPhoneNumber = user.phoneNumber; ServiceHelper.instance.targetUserID = user.userId; } ServiceHelper.instance.currentMeeting = e.Result.Meeting; //ABAddressBook addressBook = new ABAddressBook (); //ABPerson[] allContacts = addressBook.GetPeople (); //var requestingUser = e.Result.Meeting.Users.Where(x => x.phoneNumber != ServiceHelper.instance.localPhoneNumber).FirstOrDefault(); InvokeOnMainThread(delegate() { ShowAlert(ServiceHelper.instance.targetPhoneNumber.ToString()); }); }
private void callgetMeetingDelegate(object sender, GetMeetingCompletedEventArgs e) { getMeetingMethodToCall(sender, e); }