Пример #1
0
        //https://docs.microsoft.com/en-us/dotnet/api/system.windows.dependencypropertychangedeventargs?view=netcore-3.1
        private static void OnGetLastEventDataChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            uImageControl imageControl = (uImageControl)obj;

            ROIDescriptor.LastEventData lastEventData = (ROIDescriptor.LastEventData)args.NewValue;
            ROIDescriptor.LastEventData other         = (ROIDescriptor.LastEventData)args.OldValue;
            if (lastEventData.type == EventType.Draw)
            {
                ROIDescriptor lastROIDescriptor     = imageControl._lastROIDescriptor;
                ROIDescriptor previousROIDescriptor = imageControl.GetROIDescriptor();
                if (!lastEventData.IsChanged(other) || !previousROIDescriptor.IsChanged(lastROIDescriptor))
                {
                    imageControl._lastROIDescriptor = previousROIDescriptor;
                    imageControl.OnROIValueChanged(new ROIValueChangedEventArgs(lastEventData, lastROIDescriptor, previousROIDescriptor));
                }
            }
        }
Пример #2
0
 private void OnGetLastDrawEventUpdated(object sender, ROIDescriptor.LastEventArgs lastEventArgs)
 {
     GetLastEventData = lastEventArgs.data;
 }
Пример #3
0
 public ROIValueChangedEventArgs(ROIDescriptor.LastEventData lastEventData, ROIDescriptor oldROI, ROIDescriptor newROI)
 {
     this.lastEventData = lastEventData;
     this.ROI           = newROI;
 }