Ejemplo n.º 1
0
        public countback20()
        {
            InitializeComponent();

            Counter_Timer1.Interval = new TimeSpan(0, 0, 1);
            Counter_Timer1.Tick    += dispatcherTimer_Tick;
            Counter_Timer1.Start();

            //close countback window
            var timer = new DispatcherTimer {
                Interval = TimeSpan.FromSeconds(6)
            };

            timer.Start();

            timer.Tick += (sender, args) =>
            {
                timer.Stop();
                this.Close();
            };


            //var timer3 = new DispatcherTimer { Interval = TimeSpan.FromSeconds(6) };
            //timer3.Start();
            //timer3.Tick += (sender, args) =>
            //{
            //    timer3.Stop();
            //    //this.Close();
            //    Window windowchecknumber = new WindowCheckNumber();
            //    windowchecknumber.Show();

            //};
        }
Ejemplo n.º 2
0
        public countback50()
        {
            InitializeComponent();
            Counter_Timer1.Interval = new TimeSpan(0, 0, 1);
            Counter_Timer1.Tick    += dispatcherTimer_Tick;
            Counter_Timer1.Start();

            //close countback window
            var timer = new DispatcherTimer {
                Interval = TimeSpan.FromSeconds(20)
            };

            timer.Start();

            timer.Tick += (sender, args) =>
            {
                timer.Stop();
                this.Close();
            };
        }