Exemplo n.º 1
0
        private void HandleSignInResult(SignInResult signInResult, XboxLiveUser user)
        {
            switch (signInResult.Status)
            {
            case SignInStatus.Success:
                var xboxLiveContext = new Microsoft.Xbox.Services.XboxLiveContext(user);
                UserInfoLabel.Text = "Sign in succeeded";
                m_xboxliveContexts.Add(user.WindowsSystemUser.NonRoamableId, xboxLiveContext);
                m_socialManagerUI.AddUser(user);
                break;

            case SignInStatus.UserCancel:
                UserInfoLabel.Text = "User cancel";
                break;

            case SignInStatus.UserInteractionRequired:
                UserInfoLabel.Text = "User interaction required";
                break;

            default:
                UserInfoLabel.Text = "Unknown Error";
                break;
            }
            Log(UserInfoLabel.Text);
        }
Exemplo n.º 2
0
    async void SignIn()
    {
        Microsoft.Xbox.Services.System.SignInResult result = await m_user.SignInAsync(UIDispatcher);

        if (result.Status == Microsoft.Xbox.Services.System.SignInStatus.Success)
        {
            m_xboxLiveContext = new Microsoft.Xbox.Services.XboxLiveContext(m_user);
            debugText        += "\n User signed in: " + m_xboxLiveContext.User.Gamertag;
        }
    }
Exemplo n.º 3
0
    private void XblSignInUI_OnUserSignedIn(object sender, XboxLiveUser user)
    {
        m_xboxLiveContext = new Microsoft.Xbox.Services.XboxLiveContext(user);
        xblSocialUI.AddUser(user);

#if DEBUG
        m_xboxLiveContext.Settings.EnableServiceCallRoutedEvents = true;
        m_xboxLiveContext.Settings.DiagnosticsTraceLevel         = Microsoft.Xbox.Services.XboxServicesDiagnosticsTraceLevel.Verbose;
        m_xboxLiveContext.Settings.ServiceCallRouted            += Settings_ServiceCallRouted;
#endif
    }
Exemplo n.º 4
0
    private void XblSignInUI_OnUserSignedIn(object sender, XboxLiveUser user)
    {
        m_xboxLiveContext = new Microsoft.Xbox.Services.XboxLiveContext(user);
        xblGameSaveUI.InitializeSaveSystem(m_xboxLiveContext);

        // In a real game, you should also call xblGameSaveUI.InitializeSaveSystem when resuming from
        // suspension, or you may encounter ObjectExpired errors.

#if DEBUG
        m_xboxLiveContext.Settings.EnableServiceCallRoutedEvents         = true;
        XboxLiveServicesSettings.SingletonInstance.DiagnosticsTraceLevel = Microsoft.Xbox.Services.XboxServicesDiagnosticsTraceLevel.Verbose;
        m_xboxLiveContext.Settings.ServiceCallRouted += Settings_ServiceCallRouted;
#endif
    }
Exemplo n.º 5
0
 private void XblSignInUI_OnUserSignedOut(object sender, XboxLiveUser user)
 {
     m_xboxLiveContext = null;
     xblGameSaveUI.InitializeSaveSystem(null);
 }
Exemplo n.º 6
0
 private void XblSignInUI_OnUserSignedOut(object sender, XboxLiveUser user)
 {
     m_xboxLiveContext = null;
     xblSocialUI.RemoveUser(user);
 }
Exemplo n.º 7
0
 private void XblSignInUI_OnUserSignedOut(object sender, XboxLiveUser user)
 {
     m_xboxLiveContext = null;
     xblDataUI.SetXboxLiveContext(null);
 }