equal
deleted
inserted
replaced
362 Content = new TimelineAnnotationView() |
362 Content = new TimelineAnnotationView() |
363 { |
363 { |
364 DataContext = findSource.DataContext |
364 DataContext = findSource.DataContext |
365 } |
365 } |
366 }; |
366 }; |
367 |
367 |
368 // We apply the current scale to the dragged annotation |
368 // We apply the current scale to the dragged annotation |
369 ((TimelineAnnotationView)cursorVisual.Content).RenderTransform = this.RenderTransform; |
369 ((TimelineAnnotationView)cursorVisual.Content).RenderTransform = this.RenderTransform; |
370 |
370 |
371 // Add a handler. This will enable the application to change the visual cues. (NOT USEFUL IN FINGERSDANCE CASE) |
371 // Add a handler. This will enable the application to change the visual cues. (NOT USEFUL IN FINGERSDANCE CASE) |
372 //SurfaceDragDrop.AddTargetChangedHandler(cursorVisual, OnTargetChanged); |
372 //SurfaceDragDrop.AddTargetChangedHandler(cursorVisual, OnTargetChanged); |
402 e.Handled = startDragOkay; |
402 e.Handled = startDragOkay; |
403 } |
403 } |
404 |
404 |
405 private void onDragCanceled(Object sender, SurfaceDragDropEventArgs e) |
405 private void onDragCanceled(Object sender, SurfaceDragDropEventArgs e) |
406 { |
406 { |
407 //Console.WriteLine("onDragCanceled = " + sender + ", ((ContentControl)e.Cursor.Visual).Content = " + ((ContentControl)e.Cursor.Visual).Content); |
407 Console.WriteLine("onDragCanceled = " + sender + ", ((ContentControl)e.Cursor.Visual).Content = " + ((ContentControl)e.Cursor.Visual).Content); |
408 // We check if the annotation is well one of the current annotations |
408 // We check if the annotation is well one of the current annotations |
409 if (CuttingVM != null) |
409 if (CuttingVM != null) |
410 { |
410 { |
411 // e.Cursor.Visual is the ContentControl, so its Content is the dragged TimelineAnnotationView |
411 // e.Cursor.Visual is the ContentControl, so its Content is the dragged TimelineAnnotationView |
412 canceledAnnotationVM = (AnnotationViewModel)((TimelineAnnotationView)((ContentControl)e.Cursor.Visual).Content).DataContext; |
412 canceledAnnotationVM = (AnnotationViewModel)((TimelineAnnotationView)((ContentControl)e.Cursor.Visual).Content).DataContext; |
414 } |
414 } |
415 } |
415 } |
416 |
416 |
417 private void confirmCancelPopup_ConfirmYesOrNo(object sender, ConfirmEventArgs e) |
417 private void confirmCancelPopup_ConfirmYesOrNo(object sender, ConfirmEventArgs e) |
418 { |
418 { |
419 //Console.WriteLine("Confirm = " + e.Confirmed); |
419 //Consolenfirm = " + e.Confirmed); |
420 // We check if the annotation is well one of the current annotations |
420 // We check if the annotation is well one of the current annotations |
421 if (CuttingVM != null && canceledAnnotationVM != null && e.Confirmed == true) |
421 if (CuttingVM != null && canceledAnnotationVM != null && e.Confirmed == true) |
422 { |
422 { |
423 foreach (Annotation a in AnnotList) |
423 foreach (Annotation a in AnnotList) |
424 { |
424 { |