示例#1
0
        public ViewOAM()
        {
            this.InitializeComponent();

            _keyBindings = new Dictionary <Key, KeyboardShortcutDelegate>()
            {
                { Key.NumPad0, new KeyboardShortcutDelegate(TogglePreview) },
                { Key.NumPad1, new KeyboardShortcutDelegate(IncreaseLowerThreshold) },
                { Key.NumPad2, new KeyboardShortcutDelegate(DecreaseUpperThreshold) },
                { Key.NumPad3, new KeyboardShortcutDelegate(IncreaseUpperThreshold) },
                { Key.NumPad4, new KeyboardShortcutDelegate(ToggleAutoScale) },
                { Key.NumPad5, new KeyboardShortcutDelegate(ToggleTransparency) },
                { Key.NumPad6, new KeyboardShortcutDelegate(ToggleLogScale) },
                { Key.NumPad7, new KeyboardShortcutDelegate(CycleImageLayers) },
                { Key.NumPad8, new KeyboardShortcutDelegate(DecreaseSoS) },
                { Key.NumPad9, new KeyboardShortcutDelegate(IncreaseSoS) },
                { Key.Decimal, new KeyboardShortcutDelegate(TagImage) },
                { Key.Return, new KeyboardShortcutDelegate(ToggleRecording) },
                { Key.Divide, new KeyboardShortcutDelegate(ResetImageProperties) },
                { Key.Multiply, new KeyboardShortcutDelegate(DecreaseLowerThreshold) },
                { Key.Subtract, new KeyboardShortcutDelegate(ToggleLayerVisibility) },
                { Key.Add, new KeyboardShortcutDelegate(Snapshot) },
                { Key.PageUp, new KeyboardShortcutDelegate(ZoomIn) },
                { Key.PageDown, new KeyboardShortcutDelegate(ZoomOut) },
            };
            _mouseClickInsideImagePropertiesMenusBehavior = new MouseClickInsideOfControlBehavior(HandleClickInsideImagePropertiesMenus, oamMenuStackPanel);
            _mouseClickInsideImagePropertiesMenusBehavior.RegisterElement();
        }
        public ViewImagingSuperSessionsGrid()
        {
            this.InitializeComponent();

            _singleViewKeyBindings = new Dictionary <Key, KeyboardShortcutDelegate>()
            {
                { Key.NumPad1, new KeyboardShortcutDelegate(IncreaseLowerThreshold) },
                { Key.NumPad2, new KeyboardShortcutDelegate(DecreaseUpperThreshold) },
                { Key.NumPad3, new KeyboardShortcutDelegate(IncreaseUpperThreshold) },
                { Key.NumPad5, new KeyboardShortcutDelegate(ToggleTransparency) },
                { Key.NumPad6, new KeyboardShortcutDelegate(ToggleLogScale) },
                { Key.NumPad7, new KeyboardShortcutDelegate(CycleImageLayers) },
                { Key.NumPad8, new KeyboardShortcutDelegate(DecreaseSoS) },
                { Key.NumPad9, new KeyboardShortcutDelegate(IncreaseSoS) },
                { Key.Decimal, new KeyboardShortcutDelegate(TagImage) },
                //{ Key.Divide,  new KeyboardShortcutDelegate( ResetImageProperties ) },
                { Key.Multiply, new KeyboardShortcutDelegate(DecreaseLowerThreshold) },
                { Key.Subtract, new KeyboardShortcutDelegate(ToggleLayerVisibility) },
                { Key.PageUp, new KeyboardShortcutDelegate(ZoomIn) },
                { Key.PageDown, new KeyboardShortcutDelegate(ZoomOut) },
            };

            _multiViewKeyBindings = new Dictionary <Key, KeyboardShortcutDelegate>()
            {
                { Key.PageUp, new KeyboardShortcutDelegate(ZoomIn) },
                { Key.PageDown, new KeyboardShortcutDelegate(ZoomOut) },
            };

            ((INotifyCollectionChanged)imagingSessionsItemsControl.Items).CollectionChanged += ViewImagingSuperSessionsGrid_CollectionChanged;
            _mouseClickInsideImagePropertiesMenusBehavior = new MouseClickInsideOfControlBehavior(HandleClickInsideImagePropertiesMenus, comparisonMenuStackPanel);
            _mouseClickInsideImagePropertiesMenusBehavior.RegisterElement();
        }