/// <summary> /// Try login user when login page displayed /// </summary> /// <returns>The start login.</returns> /// <param name="login">Login.</param> /// <param name="password">Password.</param> private async Task TryStartLogin(string login, string password) { try { var userId = await App.QbProvider.LoginWithLoginValueAsync(login, password, platform, uid); if (userId > 0) { DependencyService.Get <ILoginStorage>().Save(login, password); App.UserId = userId; MessageProvider.Instance.Init(App.QbProvider.GetClient()); await MessageProvider.Instance.ConnetToXmpp(userId, password); //#if __ANDROID__ || __IOS__ //App.Navigation.InsertPageBefore(new UsersInGroup(), (App.Current.MainPage as NavigationPage).CurrentPage); //await App.Navigation.PopAsync(); App.SetUsersPage(); //#endif } } catch (Exception ex) { Debug.WriteLine("TryStartLogin: " + ex.ToString()); } }
private void RejectCommandExecute(object obj) { this.IsBusy = true; App.CallHelperProvider.RejectVideoCall(); Device.BeginInvokeOnMainThread(() => App.SetUsersPage() ); this.IsBusy = false; }
private void IncomingDropMessage(object sender, VideoChatMessage e) { //if (e.Caller == e.Sender.ToString()) //{ Device.BeginInvokeOnMainThread(() => App.SetUsersPage()); //} //else //{ // users = users.Where(u => u.Id != e.Sender).ToList(); // if (users.Any()) // { // Device.BeginInvokeOnMainThread(() => App.SetUsersPage()); // } //} }
private void OnCallDownEvent(object sender, EventArgs e) { Device.BeginInvokeOnMainThread(() => App.SetUsersPage()); }