Example #1
0
        public CloseViewerOutput CloseViewer(CloseViewerInput input)
        {
            Platform.CheckForNullReference(input, "input");
            Platform.CheckMemberIsSet(input.ViewerId, "ViewerId");

            var viewer    = _viewers[(int)input.ViewerId];
            var workspace = Application.ActiveDesktopWindow.Workspaces
                            .First(w => ImageViewerComponent.GetAsImageViewer(w) == viewer);

            workspace.Close(UserInteraction.NotAllowed);

            return(new CloseViewerOutput());
        }
Example #2
0
		public CloseViewerOutput CloseViewer(CloseViewerInput input)
		{
			Platform.CheckForNullReference(input, "input");
			Platform.CheckMemberIsSet(input.ViewerId, "ViewerId");

			var viewer = _viewers[(int)input.ViewerId];
			var workspace = Application.ActiveDesktopWindow.Workspaces
				.First(w => ImageViewerComponent.GetAsImageViewer(w) == viewer);

			workspace.Close(UserInteraction.NotAllowed);

			return new CloseViewerOutput();
		}