private void nextTrackButton_Click(object sender, RoutedEventArgs e) { if (!parameterManager.TracksManager.IsInitialized) { MessageBox.Show(Properties.Strings.TracksManagerException01); return; } TracksManager tracksManager = parameterManager.TracksManager; if (tracksManager.TrackingIndex + 1 >= tracksManager.NumOfTracks) { MessageBox.Show(Properties.Strings.TrackFoundComplete); return; } tracksManager.UpdateTrack(); UpdateTrackInfo(); MotorControler mc = MotorControler.GetInstance(); if (mc.IsMoving) { if (askAbortMotorMoving()) { mc.AbortMoving(); stage.WriteLine(Properties.Strings.AbortMotor); } else { return; } } Track track = tracksManager.Track; stage.WriteLine(Properties.Strings.Moving); #if !NoHardware mc.MovePointXY(track.MsX, track.MsX, delegate { stage.WriteLine(Properties.Strings.MovingComplete); }); #endif tracksItem[tracksManager.TrackingIndex].FontWeight = FontWeights.Bold; }