private void play_pause_Click(object sender, RoutedEventArgs e) { if (track == null) { track = new trackplay(); track.m_markLayer = this.MarkLayer; track.GetAllPntsOnLine(m_road.Points); } if (!playFlag) { playFlag = true; this.play.Source = new BitmapImage(new Uri("../images/play/pause.png", UriKind.Relative)); this.stop.IsEnabled = true; track.play(); } else { track.pause(); this.play.Source = new BitmapImage(new Uri("../images/play/play.png", UriKind.Relative)); } }
private void pause_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (track == null) { Points = pntList; track = new trackplay(); track.m_markLayer = this.MarkLayer; track.GetAllPntsOnLine(Points); } track.playOverBackHander += playOver; if (!playFlag) { playFlag = true; this.pause.Source = new BitmapImage(new Uri("../images/play/pause.png", UriKind.Relative)); //this.stop.IsEnabled = true; //track.play(); if (this.goOn) { this.goOn = false; this.track.Start(); } else { track.play(); } } else { this.goOn = true; playFlag = false; track.pause(); this.pause.Source = new BitmapImage(new Uri("../images/play/play.png", UriKind.Relative)); } //Image img = sender as Image; //img.Source = new BitmapImage(new Uri("../images/play/pause.png", UriKind.Relative)); }