Пример #1
0
 public void Show()
 {
     if (this.ShowEnabled)
     {
         KeyImageClipboard.Show(Context.DesktopWindow);
     }
 }
Пример #2
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);
                }
            }
        }