TraktPlugin.GUI.GUISettingsAccount.ShowAccountControls C# (CSharp) Méthode

ShowAccountControls() private méthode

private ShowAccountControls ( bool newUser ) : void
newUser bool
Résultat void
        private void ShowAccountControls(bool newUser)
        {
            // trakt v2 API no longer supports this unless using the OAuth workflow
            if (newUser)
            {
                GUIUtils.ShowOKDialog(Translation.CreateAccount, Translation.CreateAccountWebsite);
                return;
            }

            // set conditions so skins can show controls for account login/creation
            // there were issues when trying to invoke a virtual keyboard from a dialog
            // ie. (dialog from with-in another dialog) hence the reason why
            // we are re-using existing window to show controls.
            GUIUtils.SetProperty("#Trakt.Settings.Account.Dialog.Visible", "true");
            GUIUtils.SetProperty("#Trakt.Settings.Account.Dialog.NewUser", newUser.ToString().ToLowerInvariant());
            GUIWindowManager.Process();

            if (btnUsername != null)
                GUIControl.FocusControl(GetID, btnUsername.GetID);
            if (btnOk != null)
                GUIControl.SetControlLabel(GetID, btnOk.GetID, newUser ? Translation.Create : Translation.Login);
            if (lblTitle != null)
                GUIControl.SetControlLabel(GetID, lblTitle.GetID, newUser ? Translation.CreateAccount : Translation.Login);

            NewAccount = newUser;
        }