/// <summary>
 /// Sets the header key images
 /// </summary>
 /// <param name="colours">The colours.</param>
 public void SetColours(List <Color> colours)
 {
     startPageBox.Image = ExtentColour.KeyImage(colours[0]);
     slot0Box.Image     = ExtentColour.KeyImage(colours[1]);
     slot1Box.Image     = ExtentColour.KeyImage(colours[2]);
     slot2Box.Image     = ExtentColour.KeyImage(colours[3]);
     slot3Box.Image     = ExtentColour.KeyImage(colours[4]);
     slot4Box.Image     = ExtentColour.KeyImage(colours[5]);
     slot5Box.Image     = ExtentColour.KeyImage(colours[6]);
     slot6Box.Image     = ExtentColour.KeyImage(colours[7]);
     slot7Box.Image     = ExtentColour.KeyImage(colours[8]);
 }
        private void SpaceUsedPanel_Paint(object sender, PaintEventArgs e)
        {
            var pfsSpaceBrush = new LinearGradientBrush(spaceUsedPanel.ClientRectangle,
                                                        ExtentColour.LightBackgroundColour(spaceColour),
                                                        spaceColour,
                                                        LinearGradientMode.Vertical);

            e.Graphics.FillRectangle(pfsSpaceBrush,
                                     new Rectangle(spaceUsedPanel.ClientRectangle.Location,
                                                   new Size((int)(spaceUsedPanel.Width * spaceUsed),
                                                            spaceUsedPanel.Height)));

            ControlPaint.DrawBorder(e.Graphics, spaceUsedPanel.ClientRectangle, Color.DarkGray, ButtonBorderStyle.Solid);
        }
        /// <summary>
        /// Refreshes the allocation status from the various allocation pages
        /// </summary>
        /// <param name="pageAddress">The page address.</param>
        private void RefreshAllocationStatus(PageAddress pageAddress)
        {
            Image unallocated   = ExtentColour.KeyImage(Color.Gainsboro);
            Image gamAllocated  = ExtentColour.KeyImage(Color.FromArgb(172, 186, 214));
            Image sGamAllocated = ExtentColour.KeyImage(Color.FromArgb(168, 204, 162));
            Image dcmAllocated  = ExtentColour.KeyImage(Color.FromArgb(120, 150, 150));
            Image bcmAllocated  = ExtentColour.KeyImage(Color.FromArgb(150, 120, 150));

            gamPictureBox.Image  = Page.AllocationStatus(PageType.Gam) ? unallocated : gamAllocated;
            sGamPictureBox.Image = Page.AllocationStatus(PageType.Sgam) ? sGamAllocated : unallocated;
            dcmPictureBox.Image  = Page.AllocationStatus(PageType.Dcm) ? dcmAllocated : unallocated;
            bcmPictureBox.Image  = Page.AllocationStatus(PageType.Bcm) ? bcmAllocated : unallocated;

            gamTextBox.Text  = Allocation.AllocationPageAddress(pageAddress, PageType.Gam).ToString();
            sgamTextBox.Text = Allocation.AllocationPageAddress(pageAddress, PageType.Sgam).ToString();
            dcmTextBox.Text  = Allocation.AllocationPageAddress(pageAddress, PageType.Dcm).ToString();
            bcmTextBox.Text  = Allocation.AllocationPageAddress(pageAddress, PageType.Bcm).ToString();
            pfsTextBox.Text  = Allocation.AllocationPageAddress(pageAddress, PageType.Pfs).ToString();

            pfsByte = Page.PfsStatus();

            pfsPanel.Invalidate();
        }