aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-04-17 18:47:20 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-04-17 18:47:20 +0300
commitaba62e86fcc78e71bdcb263abda735e844e86240 (patch)
treeedf8d5f2480e65be3981aaf76796658ae282ebb4 /Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
parentca2d16fcff8b8776acee40ad6ee287e8293e8299 (diff)
downloadTango-aba62e86fcc78e71bdcb263abda735e844e86240.tar.gz
Tango-aba62e86fcc78e71bdcb263abda735e844e86240.zip
Fixed a few issues with PPC events and memory leak.
Changed color space PANTON to Coats. Modified JobProgressBarItem in PPC to display the proper duration.
Diffstat (limited to 'Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs')
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs51
1 files changed, 25 insertions, 26 deletions
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
index 8833feff8..1c84b8768 100644
--- a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
+++ b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropService.cs
@@ -597,6 +597,31 @@ namespace Tango.DragAndDrop
}
/// <summary>
+ /// Handles the Unloaded event of the Element control.
+ /// </summary>
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
+ private static void Element_Unloaded(object sender, RoutedEventArgs e)
+ {
+ FrameworkElement element = sender as FrameworkElement;
+ UnRegisterDraggable(element);
+ element.PreviewMouseUp -= Draggable_PreviewMouseUp;
+ element.Unloaded -= Element_Unloaded;
+ }
+
+ /// <summary>
+ /// Handles the Unloaded1 event of the Element control.
+ /// </summary>
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
+ private static void Element_Unloaded1(object sender, RoutedEventArgs e)
+ {
+ FrameworkElement element = sender as FrameworkElement;
+ UnRegisterDroppable(element);
+ element.Unloaded -= Element_Unloaded1;
+ }
+
+ /// <summary>
/// Registers a framework element as a droppable element.
/// </summary>
/// <param name="element">The element.</param>
@@ -814,32 +839,6 @@ namespace Tango.DragAndDrop
}
}
- /// <summary>
- /// Handles the Unloaded event of the Element control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
- private static void Element_Unloaded(object sender, RoutedEventArgs e)
- {
- //FrameworkElement element = sender as FrameworkElement;
- //UnRegisterDraggable(element);
- }
-
- #endregion
-
- #region Droppable Event Handlers
-
- /// <summary>
- /// Handles the Unloaded1 event of the Element control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
- private static void Element_Unloaded1(object sender, RoutedEventArgs e)
- {
- //FrameworkElement element = sender as FrameworkElement;
- //UnRegisterDroppable(element);
- }
-
#endregion
}
}