public AdornerBase(UIElement element, PanZoomPanel panZoomPanel) : base(element) { MenuItem mi = new MenuItem(); var binding = new Binding("Remove"); binding.Source = CultureResources.getDataProvider(); BindingOperations.SetBinding(mi, MenuItem.HeaderProperty, binding); mi.Click += new RoutedEventHandler(RemoveItem_Click); this.ContextMenu = new ContextMenu(); this.ContextMenu.Items.Add(mi); _Zoom = panZoomPanel.Zoom; _OffsetX = panZoomPanel.OffsetX; _OffsetY = panZoomPanel.OffsetY; panZoomPanel.ZoomChanged += new DoublePropertyEventHandler(panZoomPanel_ZoomChanged); panZoomPanel.OffsetXChanged += new DoublePropertyEventHandler(panZoomPanel_OffsetXChanged); panZoomPanel.OffsetYChanged += new DoublePropertyEventHandler(panZoomPanel_OffsetYChanged); IsClipEnabled = true; EventsRegistered = false; _IsEnabled = false; visualChildren = new VisualCollection(this); }
public AOIAdorner(UIElement element, PanZoomPanel panZoomPanel) : base(element, panZoomPanel) { m_AOIWindows = new List <AOIWindow>(); LeftMouseBtnWasPressed = false; m_element = element; }
public AnnotationAdorner(UIElement element, PanZoomPanel panZoomPanel) : base(element, panZoomPanel) { _Annotations = new List <Annotation>(); MenuItem mi = new MenuItem(); var binding = new Binding("Comment"); binding.Source = CultureResources.getDataProvider(); BindingOperations.SetBinding(mi, MenuItem.HeaderProperty, binding); mi.Click += new RoutedEventHandler(CommentItem_Click); ContextMenu.Items.Add(mi); MainContextMenuOpen = false; }
public TIPAdorner(UIElement element, PanZoomPanel panZoomPanel) : base(element, panZoomPanel) { m_TIPMarkingsList = new List <RectangleGeometry>(); }
public MeasureAdorner(UIElement element, PanZoomPanel panZoomPanel) : base(element, panZoomPanel) { _MeasurementLines = new List <MeasurementLine>(); _Cursor = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream("L3.Cargo.Workstation.Plugins.XRayImageBase.Resources.Cursors.ruler.cur")); }