Example #1
0
        void proxy_AuthenticateCompleted(object sender, AuthenticateCompletedEventArgs e)
        {
            if (e.Error == null && e.Result != null)
            {
                (App.Current as App).UserData = e.Result;

                (App.Current as App).SUserData = new SubscriptionServiceReference.AccountWebServiceModel();
                (App.Current as App).SUserData.Credit = e.Result.Credit;
                (App.Current as App).SUserData.FirstName = e.Result.FirstName;
                (App.Current as App).SUserData.LastName = e.Result.LastName;
                (App.Current as App).SUserData.UserName = e.Result.UserName;
                (App.Current as App).SUserData.GUID = e.Result.GUID;

                (App.Current as App).TUserData = new TicketServiceReference.AccountWebServiceModel();
                (App.Current as App).TUserData.Credit = e.Result.Credit;
                (App.Current as App).TUserData.FirstName = e.Result.FirstName;
                (App.Current as App).TUserData.LastName = e.Result.LastName;
                (App.Current as App).TUserData.UserName = e.Result.UserName;
                (App.Current as App).TUserData.GUID = e.Result.GUID;

                this.NavigationService.Navigate(new Uri("/ReBusPivotMenu.xaml", UriKind.Relative));
            }
            else
            {
                MessageBox.Show("Eroare la log in.");
            }
            HidePopup();
        }
        private void UserLoggedIn(AuthenticateCompletedEventArgs args)
        {
            currentUser = args.Result;

            LoginStatusChangedEvent loginEvent = eventAggregator.GetEvent<LoginStatusChangedEvent>();
            loginEvent.Publish(currentUser);
        }
Example #3
0
        private void AuthenticateCompleted(object sender, AuthenticateCompletedEventArgs e)
        {
            if (e.Cancelled || e.Error != null || !e.Result)
            {
                txtError.Text = "Login failed, please try again.";

                if (e.Cancelled)
                {
                    ToolTipService.SetToolTip(txtError, "Service call cancelled");
                }
                else if (e.Error != null)
                {
                    string message = string.Format("Service call exception: {0}", e.Error.Message);
                    ToolTipService.SetToolTip(txtError, message);
                }
            }
            else if (e.Result)
            {
                SessionManager.Session["user"] = new User() {Username = txtUsername.Text};
                NavigationService.Navigate(new Uri("/main", UriKind.Relative));
            }
            else
            {
                txtError.Text = "Unknown response from service call";
            }

            btnLogin.IsEnabled = true;
        }
Example #4
0
        private void AuthenticateCompleted(object sender, AuthenticateCompletedEventArgs e)
        {
            if (e.Cancelled || e.Error != null || !e.Result)
            {
                txtError.Text = "Login failed, please try again.";

                if (e.Cancelled)
                {
                    ToolTipService.SetToolTip(txtError, "Service call cancelled");
                }
                else if (e.Error != null)
                {
                    string message = string.Format("Service call exception: {0}", e.Error.Message);
                    ToolTipService.SetToolTip(txtError, message);
                }
            }
            else if (e.Result)
            {
                SessionManager.Session["user"] = new User()
                {
                    Username = txtUsername.Text
                };
                NavigationService.Navigate(new Uri("/main", UriKind.Relative));
            }
            else
            {
                txtError.Text = "Unknown response from service call";
            }

            btnLogin.IsEnabled = true;
        }
Example #5
0
 protected virtual void OnAuthenticateCompleted(AuthenticateCompletedEventArgs e)
 {
     if (AuthenticateCompleted != null)
     {
         AuthenticateCompleted(this, e);
     }
 }
Example #6
0
        private void OnLoginSuccess(AuthenticateCompletedEventArgs authenticateCompletedEventArgs)
        {
            try
            {
                if (authenticateCompletedEventArgs.Error != null)
                {
                    this.ReportError("Login failed " + authenticateCompletedEventArgs.Error.Message);
                    return;
                }

                this.RequestNavigate <MainMenuViewModel>();
            }
            finally
            {
                this.IsLoggingIn = false;
            }
        }
Example #7
0
        void client_AuthenticateCompleted(object sender, AuthenticateCompletedEventArgs e)
        {
            bar.IsIndeterminate           = false;
            client.AuthenticateCompleted -= client_AuthenticateCompleted;
            if (e.Result != -1)
            {
                userId = e.Result;


                NavigationService.Navigate(new Uri("/feed.xaml", UriKind.Relative));
            }


            else
            {
                MessageBox.Show("Please check your account information", "Oops, something went wrong", MessageBoxButton.OK);
                //remove the stack call from the service.
            }
        }
 private void GnsClientOnAuthenticateCompleted(object sender, AuthenticateCompletedEventArgs e)
 {
     if (e.Result != null && e.Error == null)
     {
         UserMe = e.Result;
         MainGrid.Visibility = Visibility.Visible;
         WelcomeGrid.Visibility = Visibility.Collapsed;
         _childWindow = new ChildWindowAddGameNick( _gnsClient, UserMe);
         LoadTabFriends();
     }
 }
Example #9
0
		protected virtual void OnAuthenticateCompleted(AuthenticateCompletedEventArgs e)
		{
			if (AuthenticateCompleted != null)
				AuthenticateCompleted(this, e);
		}