Exemplo n.º 1
0
        private void botonInicioSesion_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            if (botonInicioSesion.Content.Equals("Ingresar"))
            {
                Popup popup = new Popup();
                RegistroUsuarioPopup direcPopup = new RegistroUsuarioPopup(popup, sender, this);
                popup.Child = direcPopup;
                popup.IsOpen = true;

                if (BufferUsuario.Usuario != null)
                    botonInicioSesion.Content = "Salir";
            }
            else
            {
                BufferUsuario.Usuario = null;
                botonInicioSesion.Content = "Ingresar";
            }
        }
        private void botonInicioSesion_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            if (botonInicioSesion.Content.Equals("Ingresar"))
            {
                Popup popup = new Popup();
                RegistroUsuarioPopup direcPopup = new RegistroUsuarioPopup(popup, sender, this);
                popup.Child  = direcPopup;
                popup.IsOpen = true;

                if (BufferUsuario.Usuario != null)
                {
                    botonInicioSesion.Content = "Salir";
                }
            }
            else
            {
                BufferUsuario.Usuario     = null;
                botonInicioSesion.Content = "Ingresar";
            }
        }