private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { Grid MainControl = (Grid)this.Parent; MainControl.Children.Clear(); DectionResultView view = new DectionResultView(); MainControl.Children.Add(view); }
private void TimeCounter_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { this.Dispatcher.BeginInvoke((Action)(() => { countDownTime = countDownTime.AddSeconds(-1); txtTimeCount.Text = string.Format("{0}:{1}", countDownTime.Minute.ToString().PadLeft(2, '0'), countDownTime.Second.ToString().PadLeft(2, '0')); if (countDownTime.Year < 2017) { timeCounter.Stop(); Grid MainControl = (Grid)this.Parent; MainControl.Children.Clear(); DectionResultView view = new DectionResultView(); MainControl.Children.Add(view); } })); }