Exemplo n.º 1
0
        public void Create()
        {
            if (!Enabled)
            {
                return;
            }

            var image = SelectedPresentationImage;

            try
            {
                if (image != null)
                {
                    if (!TryUpdateExistingItem(image))
                    {
                        KeyImageClipboard.Add(image);
                    }

                    _flashOverlayController.Flash(image);
                }

                if (KeyImageClipboardComponent.HasViewPlugin && _firstKeyImageCreation && ShowEnabled)
                {
                    KeyImageClipboard.Show(Context.DesktopWindow, ShelfDisplayHint.DockAutoHide | ShelfDisplayHint.DockLeft);
                    _firstKeyImageCreation = false;
                }
            }
            catch (Exception ex)
            {
                Platform.Log(LogLevel.Error, ex, "Failed to add item to the key image clipboard.");
                ExceptionHandler.Report(ex, SR.MessageCreateKeyImageFailed, Context.DesktopWindow);
            }
        }
Exemplo n.º 2
0
 public void Show()
 {
     if (ShowEnabled)
     {
         KeyImageClipboard.Show(Context.DesktopWindow);
     }
 }
Exemplo n.º 3
0
        public void Create()
        {
            if (!base.Enabled)
            {
                return;
            }

            try
            {
                IPresentationImage image = base.Context.Viewer.SelectedPresentationImage;
                if (image != null)
                {
                    KeyImageClipboard.Add(image);
                    _flashOverlayController.Flash(image);
                }

                if (_firstKeyImageCreation && this.ShowEnabled)
                {
                    KeyImageClipboard.Show(Context.DesktopWindow, ShelfDisplayHint.DockAutoHide | ShelfDisplayHint.DockLeft);
                    _firstKeyImageCreation = false;
                }
            }
            catch (Exception ex)
            {
                Platform.Log(LogLevel.Error, ex, "Failed to add item to the key image clipboard.");
                ExceptionHandler.Report(ex, SR.MessageCreateKeyImageFailed, base.Context.DesktopWindow);
            }
        }
Exemplo n.º 4
0
        public void Create()
        {
            if (!base.Enabled)
            {
                return;
            }

            if (KeyImageClipboard.HasViewPlugin)
            {
                try
                {
                    IPresentationImage image = base.Context.Viewer.SelectedPresentationImage;
                    if (image != null)
                    {
                        KeyImageClipboard.Add(image);
                        _flashOverlayController.Flash(image);
                    }

                    if (_firstKeyImageCreation && this.ShowEnabled)
                    {
                        KeyImageClipboard.Show(Context.DesktopWindow,
                                               ShelfDisplayHint.DockAutoHide | ShelfDisplayHint.DockLeft);
                        _firstKeyImageCreation = false;
                    }
                }
                catch (Exception ex)
                {
                    Platform.Log(LogLevel.Error, ex, "Failed to add item to the key image clipboard.");
                    ExceptionHandler.Report(ex, SR.MessageCreateKeyImageFailed, base.Context.DesktopWindow);
                }
            }
            else
            {
                try
                {
                    IPresentationImage image = base.Context.Viewer.SelectedPresentationImage;
                    if (image != null)
                    {
                        // New Virtual Display Set
                        // TODO (9-JAN-13) As per Phoenx5, Sprint 4 review, disable creation of the virtual display set in Webstation.
                        //KeyImageDisplaySet.AddKeyImage(image);

                        // Still save to clipboard, makes publishing easier later
                        KeyImageClipboard.Add(image);

                        _flashOverlayController.Flash(image);
                    }
                }
                catch (Exception ex)
                {
                    Platform.Log(LogLevel.Error, ex, "Failed to create virtual display set for key image.");
                    ExceptionHandler.Report(ex, SR.MessageCreateKeyImageFailed, base.Context.DesktopWindow);
                }
            }
        }