Exemplo n.º 1
0
        private const int SPLASH_FADE_TIME    = 500;  //milisecs



        protected override void OnStartup(StartupEventArgs e)
        {
            SplashScreen splash = new SplashScreen("ceibo_splash.png");


            splash.Show(false, true); //cargar splash screen

            Stopwatch timer = new Stopwatch();

            timer.Start(); //empezar stopwatch


            base.OnStartup(e);
            MainWindow main = new MainWindow(); //load/cargar ventana


            timer.Stop(); //timer para que dure 2 segundos en pantalla
            int remainingTimeToShowSplash = MINIMUM_SPLASH_TIME - (int)timer.ElapsedMilliseconds;

            if (remainingTimeToShowSplash > 0)
            {
                Thread.Sleep(remainingTimeToShowSplash);
            }


            splash.Close(TimeSpan.FromMilliseconds(SPLASH_FADE_TIME)); //show
            //main.Show();

            var newW = new windowUsuarios();

            newW.Show();
        }
Exemplo n.º 2
0
        private void btnCerrarSesion1_Click(object sender, RoutedEventArgs e)
        {
            var usuarios = new windowUsuarios();

            this.Close();
            usuarios.Show();
        }
Exemplo n.º 3
0
        private void btnsalir_Click(object sender, RoutedEventArgs e)
        {
            salir = true;
            var usuarios = new windowUsuarios();

            usuarios.Show();

            this.Close();
        }