private void segment_Clicked(object sender, EventArgs e)
{
if (sender.ToString() == "Choreoh.HoverButton")
{
HoverButton segmentButton = (HoverButton)sender;
buttonSegments.TryGetValue(segmentButton, out selectedSegment);
Point handPosition = hand.TransformToAncestor(containerCanvas).Transform(new Point(0, 0));
handPointX = handPosition.X + hand.ActualWidth / 2;
timelineMenuOpenedPosition = handPosition;
blackBack.Visibility = Visibility.Visible;
oldButtonZIndex = Canvas.GetZIndex(segmentButtonCanvas);
Canvas.SetZIndex(segmentButtonCanvas, Canvas.GetZIndex(blackBack) + 1);
Canvas.SetZIndex(playSelectedSegmentButton, Canvas.GetZIndex(blackBack) + 1);
oldDanceSegmentIndex = Canvas.GetZIndex((HoverButton)sender);
Canvas.SetZIndex(segmentCanvas, Canvas.GetZIndex(blackBack) + 1);
onlyShowThisSegment((HoverButton)sender);
segmentButtonCanvas.Visibility = Visibility.Visible;
String comment;
routine.comments.TryGetValue(selectedSegment, out comment);
// if(routine.comments.TryGetValue(selectedSegment, out comment))
{
Debug.WriteLine(comment);
commentBoxLabel.Text = "Your Comment:";
Canvas.SetZIndex(commentBoxCanvas, Canvas.GetZIndex(blackBack) + 1);
commentBoxCanvas.Visibility = Visibility.Visible;
//commentBox.Visibility = Visibility.Visible;
commentBox.Text = comment;
}
}
else
{
debug.Text = "I have made a huge mistake";
}
}