private void btnIngresar_Click(object sender, RoutedEventArgs e)
        {
            ViewLoading loading = new ViewLoading();

            loading.Show();
            timeShow(loading);
        }
Beispiel #2
0
 public static ViewLoading GetInstance()
 {
     if (_instance == null)
     {
         _instance = new ViewLoading();
     }
     return(_instance);
 }
        private void timeShow(ViewLoading loading)
        {
            DispatcherTimer timer = new DispatcherTimer()
            {
                Interval = TimeSpan.FromSeconds(1.5)
            };

            timer.Tick += delegate(object sender, EventArgs e)
            {
                ((DispatcherTimer)timer).Stop();
                if (loading.IsActive)
                {
                    loading.Close();
                }
                OpenHome();
            };

            timer.Start();
        }
Beispiel #4
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     _instance = null;
 }