Example #1
0
        void CerrarSesionButton_TouchUpInside(object sender, EventArgs e)
        {
            ConfiguracionApp configuration = new ConfiguracionApp();

            configuration.LimpiarConfiguracion();

            MainNavigationController mainNavigationController = this.Storyboard.InstantiateViewController("MainNavigation") as MainNavigationController;

            if (mainNavigationController != null)
            {
                this.NavigationController.ShowDetailViewController(mainNavigationController, this);
            }
        }
Example #2
0
        private void CerrarSesionButton_TouchUpInside(object sender, EventArgs e)
        {
            ConfiguracionApp configuration = new ConfiguracionApp();

            configuration.LimpiarConfiguracion();

            NavigationAppController loginViewController = this.Storyboard.InstantiateViewController("NavigationApp") as NavigationAppController;

            if (loginViewController != null)
            {
                TokenRegistration token = new TokenRegistration();

                Hub = new SBNotificationHub(Constants.ConnectionString, Constants.NotificationHubPath);

                Hub.UnregisterAllAsync(token.Token, (error) =>
                {
                    if (error != null)
                    {
                        return;
                    }
                });
                this.NavigationController.ShowDetailViewController(loginViewController, null);
            }
        }