private void tag_mouseRightDown(object sender, MouseButtonEventArgs e) { TextTag clickedTag = (sender as TextBlock).DataContext as TextTag; TextTagControl ttc = new TextTagControl(clickedTag); ttc.ShowDialog(); TextTag newTag = ttc.data; if (newTag != null) { tagLocationRefresh(sender as TextBlock); } }
private void newTagButton_Click(object sender, RoutedEventArgs e) { TextTagControl newttc = new TextTagControl(new TextTag(slider.Value / slider.Maximum, overlayplayer.NaturalDuration.TimeSpan.Seconds, selectedPath + "\\cases\\" + (caseSelector.SelectedIndex + 1))); newttc.ShowDialog(); TextTag newTag = newttc.data; if (newTag != null) { visualizeTag(newTag); currentTags.Add(newTag); } }