From aba62e86fcc78e71bdcb263abda735e844e86240 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 17 Apr 2019 18:47:20 +0300 Subject: 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. --- .../Tango.DragAndDrop/DragAndDropService.cs | 51 +++++++++++----------- 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'Software/Visual_Studio/Tango.DragAndDrop') 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 @@ -596,6 +596,31 @@ namespace Tango.DragAndDrop } } + /// + /// Handles the Unloaded event of the Element control. + /// + /// The source of the event. + /// The instance containing the event data. + private static void Element_Unloaded(object sender, RoutedEventArgs e) + { + FrameworkElement element = sender as FrameworkElement; + UnRegisterDraggable(element); + element.PreviewMouseUp -= Draggable_PreviewMouseUp; + element.Unloaded -= Element_Unloaded; + } + + /// + /// Handles the Unloaded1 event of the Element control. + /// + /// The source of the event. + /// The instance containing the event data. + private static void Element_Unloaded1(object sender, RoutedEventArgs e) + { + FrameworkElement element = sender as FrameworkElement; + UnRegisterDroppable(element); + element.Unloaded -= Element_Unloaded1; + } + /// /// Registers a framework element as a droppable element. /// @@ -814,32 +839,6 @@ namespace Tango.DragAndDrop } } - /// - /// Handles the Unloaded event of the Element control. - /// - /// The source of the event. - /// The instance containing the event data. - private static void Element_Unloaded(object sender, RoutedEventArgs e) - { - //FrameworkElement element = sender as FrameworkElement; - //UnRegisterDraggable(element); - } - - #endregion - - #region Droppable Event Handlers - - /// - /// Handles the Unloaded1 event of the Element control. - /// - /// The source of the event. - /// The instance containing the event data. - private static void Element_Unloaded1(object sender, RoutedEventArgs e) - { - //FrameworkElement element = sender as FrameworkElement; - //UnRegisterDroppable(element); - } - #endregion } } -- cgit v1.3.1