예제 #1
0
        private void PreviewListBox_MouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.ClickCount == 2 && e.LeftButton == MouseButtonState.Pressed)
            {
                // Selected other Slide to be pushed !
                Dispatcher.BeginInvoke(DispatcherPriority.Render,
                (SendOrPostCallback)delegate
                {
                    _context = (ManagerContext)DataContext;
                    if (_lastSelectedManagerImageRef != null)
                    {
                        _lastAutomationChange = DateTime.Now;
                        _context.SwitchToSlide(_lastSelectedManagerImageRef);
                    }

                }, null);
            }
            if (e.ClickCount == 1 && e.RightButton == MouseButtonState.Pressed)
            {
                // Right mouse click, to edit
                _context = (ManagerContext)DataContext;
                if (_lastSelectedManagerImageRef != null)
                {
                    _context.EditorImage = _lastSelectedManagerImageRef;
                }

            }
        }
예제 #2
0
 private void editorAddButtonAndMain_Click(object sender, RoutedEventArgs e)
 {
     // Add the image to the current Active Cart and set it active
     Dispatcher.BeginInvoke(DispatcherPriority.Render,
        (SendOrPostCallback)delegate
        {
        if (_context.EditorImage != null)
        {
            _context = (ManagerContext)DataContext;
            var newImg = _context.EditorImage.Clone();
            _context.PreviewCart.Slides.Add(newImg);
            _context.ReloadPreview();
            _lastAutomationChange = DateTime.Now;
            _context.SwitchToSlide(newImg);
        }
        }, null);
 }