private void ToggleLiveMode() { if (AnnoTierStatic.Selected != null && AnnoTierStatic.Selected.IsContinuous) { if (control.annoLiveModeCheckBox.IsChecked == true) { AnnoTierStatic.Selected.LiveAnnoMode(true); control.annoLiveModeCheckBox.IsChecked = false; } else { control.annoLiveModeCheckBox.IsChecked = true; AnnoTierStatic.Selected.LiveAnnoMode(false); } } else if (AnnoTierStatic.Selected != null && AnnoTierStatic.Selected.IsDiscreteOrFree) { AnnoTierStatic.UnselectLabel(); double pos = Time.PixelFromTime(timeline.CurrentPlayPosition); MainHandler.Time.CurrentSelectPosition = pos; annoCursor.X = pos; } isKeyDown = true; }
private void signalAndAnnoGrid_Move(double mouseX) { if (AnnoTierStatic.Label != null && Mouse.DirectlyOver.GetType() != AnnoTierStatic.Label.GetType() || AnnoTierStatic.Label == null) { AnnoTierStatic.UnselectLabel(); signalCursor.X = mouseX; double time = Time.TimeFromPixel(mouseX); Move(time); if (AnnoTierStatic.Selected != null) { if (AnnoTierStatic.Selected.AnnoList.Scheme.Type == AnnoScheme.TYPE.POINT || AnnoTierStatic.Selected.AnnoList.Scheme.Type == AnnoScheme.TYPE.POLYGON || AnnoTierStatic.Selected.AnnoList.Scheme.Type == AnnoScheme.TYPE.GRAPH || AnnoTierStatic.Selected.AnnoList.Scheme.Type == AnnoScheme.TYPE.SEGMENTATION) { if (control.annoListControl.annoDataGrid.Items.Count > 0) { int position = (int)(Time.CurrentPlayPosition * AnnoTierStatic.Selected.AnnoList.Scheme.SampleRate); if (position < control.annoListControl.annoDataGrid.Items.Count) { jumpToGeometric(position); } } } } } }
private void navigatorFollowAnno_Unchecked(object sender, RoutedEventArgs e) { AnnoTierStatic.UnselectLabel(); bool is_playing = IsPlaying(); Stop(); if (is_playing) { Play(); } }