예제 #1
0
        private void OnWorkspaceActivated(object sender, ItemEventArgs <Workspace> e)
        {
            Workspace activeWorkspace = _desktopWindow.ActiveWorkspace;

            if (activeWorkspace == null)
            {
                this.ImageViewer = null;
            }
            else
            {
                IImageViewer imageViewer = ImageViewerComponent.GetAsImageViewer(activeWorkspace);
                this.ImageViewer = imageViewer;
            }
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of <see cref="ImageViewerToolComponent"/>.
 /// </summary>
 protected ImageViewerToolComponent(IDesktopWindow desktopWindow)
 {
     Platform.CheckForNullReference(desktopWindow, "desktopWindow");
     _desktopWindow = desktopWindow;
     ImageViewer    = ImageViewerComponent.GetAsImageViewer(_desktopWindow.ActiveWorkspace);
 }