private void btn1_Click_1(object sender, RoutedEventArgs e) { SeccPage se = new SeccPage(); se.Show(); this.Hide(); }
public MainWindow() { InitializeComponent(); tim = TimeSpan.FromSeconds(4); tmr = new DispatcherTimer(new TimeSpan(0, 0, 1), DispatcherPriority.Normal, delegate { if (tim == TimeSpan.Zero) { tmr.Stop(); SeccPage se = new SeccPage(); se.Show(); this.Hide(); } ; tim = tim.Add(TimeSpan.FromSeconds(-1)); }, Application.Current.Dispatcher); }