示例#1
0
        public override void Initialize()
        {
            base.Initialize();
            KeyImageClipboard.OnViewerOpened(base.Context.Viewer);

            UpdateEnabled();

            if (WorkItemActivityMonitor.IsSupported)
            {
                _workItemActivityMonitor = WorkItemActivityMonitor.Create();
                _workItemActivityMonitor.IsConnectedChanged += OnIsConnectedChanged;
            }

            if (!KeyImageClipboard.HasViewPlugin)
            {
                foreach (var a in Actions)
                {
                    // TODO (CR Phoenix5 - High): use the ID, which doesn't change; this will change with language.
                    if (a.Path.LocalizedPath == "global-toolbars/ToolbarStandard/Show Key Images")
                    {
                        var buttonAction = a as ButtonAction;
                        if (buttonAction != null)
                        {
                            buttonAction.Visible = false;
                        }
                    }
                }
            }
        }
示例#2
0
 public void Show()
 {
     if (this.ShowEnabled)
     {
         KeyImageClipboard.Show(Context.DesktopWindow);
     }
 }
        protected override void Dispose(bool disposing)
        {
            if (Context != null)
            {
                KeyImageClipboard.OnDesktopWindowClosed(Context.DesktopWindow);
            }

            base.Dispose(disposing);
        }
示例#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);
                }
            }
        }
示例#5
0
        protected override void Dispose(bool disposing)
        {
            if (_workItemActivityMonitor != null)
            {
                _workItemActivityMonitor.IsConnectedChanged -= OnIsConnectedChanged;
                _workItemActivityMonitor.Dispose();
                _workItemActivityMonitor = null;
            }

            if (base.Context != null)
            {
                KeyImageClipboard.OnViewerClosed(base.Context.Viewer);
            }

            base.Dispose(disposing);
        }
示例#6
0
        internal static void Launch(IDesktopWindow desktopWindow)
        {
            KeyImageInformation info = KeyImageClipboard.GetKeyImageInformation(desktopWindow);

            if (info == null)
            {
                throw new ArgumentException("There is no valid key image data available for the given window.", "desktopWindow");
            }

            KeyImageInformationEditorComponent component = new KeyImageInformationEditorComponent();

            component.Description       = info.Description;
            component.DocumentTitle     = info.DocumentTitle;
            component.SeriesDescription = info.SeriesDescription;

            ApplicationComponentExitCode exitCode = LaunchAsDialog(desktopWindow, component, SR.TitleEditKeyImageInformation);

            if (exitCode == ApplicationComponentExitCode.Accepted)
            {
                info.Description       = component.Description;
                info.DocumentTitle     = component.DocumentTitle;
                info.SeriesDescription = component.SeriesDescription;
            }
        }
 public override void Initialize()
 {
     base.Initialize();
     KeyImageClipboard.OnDesktopWindowOpened(Context.DesktopWindow);
 }