public WinNumber3() { InitializeComponent(); DataContext = this; digits = displaynumber[CounterVar2.count1].ToCharArray(); Counter_Timer.Interval = new TimeSpan(0, 0, 1); Counter_Timer.Tick += dispatcherTimer_Tick; if (CounterVar2.count1 < displaynumber.Length - 1) { //Counter_Timer.Interval = new TimeSpan(0, 0, 1); //Counter_Timer.Tick += dispatcherTimer_Tick; Counter_Timer.Start(); CounterVar2.count1++; // timer to close the counting window "windownumber" var timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(6) }; timer.Start(); timer.Tick += (sender, args) => { timer.Stop(); this.Close(); }; //timer to open countback window var timer1 = new DispatcherTimer { Interval = TimeSpan.FromSeconds(5.9) }; timer1.Start(); timer1.Tick += (sender, args) => { timer1.Stop(); Window countback100 = new countback100(); countback100.Show(); }; var timer3 = new DispatcherTimer { Interval = TimeSpan.FromSeconds(34) }; timer3.Start(); timer3.Tick += (sender, args) => { timer3.Stop(); Window windowchecknumber2 = new WindowCheckNumber2(); windowchecknumber2.Show(); }; } else { Window Thanku = new Thankyou(); Thanku.Show(); Environment.Exit(0); } }
public Windownumber() { InitializeComponent(); //DataContext = this; Counter_Timer.Interval = new TimeSpan(0, 0, 1); Counter_Timer.Tick += dispatcherTimer_Tick; //counter1.Text = a[i].ToString(); Counter_Timer.Start(); // timer to close the counting window "windownumber" var timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(6) }; timer.Start(); timer.Tick += (sender, args) => { timer.Stop(); this.Close(); //Window countback20 = new countback20(); //countback20.Show(); }; //timer to open countback window var timer1 = new DispatcherTimer { Interval = TimeSpan.FromSeconds(5.9) }; timer1.Start(); timer1.Tick += (sender, args) => { timer1.Stop(); Window countback20 = new countback20(); countback20.Show(); }; var timer3 = new DispatcherTimer { Interval = TimeSpan.FromSeconds(11.9) }; timer3.Start(); timer3.Tick += (sender, args) => { timer3.Stop(); //this.Close(); Window windowchecknumber = new WindowCheckNumber(); windowchecknumber.Show(); }; }
public WinNumber2() { InitializeComponent(); DataContext = this; digits = displaynumber[CounterVar1.count1].ToCharArray(); Counter_Timer.Interval = new TimeSpan(0, 0, 1); Counter_Timer.Tick += dispatcherTimer_Tick; if (CounterVar1.count1 < displaynumber.Length - 1) { //Counter_Timer.Interval = new TimeSpan(0, 0, 1); //Counter_Timer.Tick += dispatcherTimer_Tick; Counter_Timer.Start(); CounterVar1.count1++; // timer to close the counting window "windownumber" var timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(6) }; timer.Start(); timer.Tick += (sender, args) => { timer.Stop(); this.Close(); }; //timer to open countback window var timer1 = new DispatcherTimer { Interval = TimeSpan.FromSeconds(5.9) }; timer1.Start(); timer1.Tick += (sender, args) => { timer1.Stop(); Window countback50 = new countback50(); countback50.Show(); }; var timer3 = new DispatcherTimer { Interval = TimeSpan.FromSeconds(23) }; timer3.Start(); timer3.Tick += (sender, args) => { timer3.Stop(); Window windowchecknumber1 = new WindowCheckNumber1(); windowchecknumber1.Show(); }; } else { var timer7 = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) }; timer7.Start(); timer7.Tick += (sender, args) => { timer7.Stop(); FinalLevel FL = new FinalLevel(); FL.Show(); }; } }