public MainViewController()
            : base(UITableViewStyle.Grouped, null)
        {
            SignIn.SharedInstance.Delegate = this;
            SignIn.SharedInstance.UIDelegate = this;

            // Automatically sign in the user.
            SignIn.SharedInstance.SignInUserSilently ();

            status = new StringElement ("Not Signed In", () => {
                // Sign out
                SignIn.SharedInstance.SignOutUser ();

                // Clear signed in app state
                currentAuth = null;
                Root[1].Clear ();
                ToggleAuthUI ();
            });
            signinButton = new SignInButtonElement ();

            Root = new RootElement ("Sign In Migration") {
                new Section {
                    signinButton,
                    status,
                },
                new Section {
                },
            };

            ToggleAuthUI ();
        }
Beispiel #2
0
        public MainViewController() : base(UITableViewStyle.Grouped, null)
        {
            SignIn.SharedInstance.Delegate   = this;
            SignIn.SharedInstance.UIDelegate = this;

            // Automatically sign in the user.
            SignIn.SharedInstance.SignInUserSilently();

            status = new StringElement("Not Signed In", () => {
                // Sign out
                SignIn.SharedInstance.SignOutUser();

                // Clear signed in app state
                currentAuth = null;
                Root[1].Clear();
                ToggleAuthUI();
            });
            signinButton = new SignInButtonElement();

            Root = new RootElement("Sign In Migration")
            {
                new Section {
                    signinButton,
                    status,
                },
                new Section {
                },
            };

            ToggleAuthUI();
        }