Example #1
0
        public override bool HandleLayout(IHpLayoutHookContext context)
        {
            var primaryImageSet = context.ImageViewer.LogicalWorkspace.ImageSets[0];
            var firstKeyImageDisplaySet = primaryImageSet.DisplaySets.FirstOrDefault(IsKeyImageDisplaySet);
            if (firstKeyImageDisplaySet == null)
                return false;

            context.ImageViewer.PhysicalWorkspace.SetImageBoxGrid(1, 1);
            var imageBox = context.ImageViewer.PhysicalWorkspace.ImageBoxes[0];
            imageBox.SetTileGrid(1, 1);
            imageBox.DisplaySet = firstKeyImageDisplaySet.CreateFreshCopy();

            return true;
        }
Example #2
0
 /// <summary>
 /// Handles the initial layout when a viewer is first opened.
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 public abstract bool HandleLayout(IHpLayoutHookContext context);
Example #3
0
 public bool HandleLayout(IHpLayoutHookContext context)
 {
     return false;
 }
Example #4
0
        public override bool HandleLayout(IHpLayoutHookContext context)
        {
            if (_rows > 0 && _cols > 0)
            {
                var primaryImageSet = context.ImageViewer.LogicalWorkspace.ImageSets[0];
                context.ImageViewer.PhysicalWorkspace.SetImageBoxGrid(_rows, _cols);
                foreach (var imageBox in context.ImageViewer.PhysicalWorkspace.ImageBoxes)
                    imageBox.SetTileGrid(1, 1);

                context.PerformDefaultFillPhysicalWorkspace();

                return true;
            }
            else
                return false;
            
        }