/// <summary> /// Initializes a new instance of the <see cref="PageViewerWindow"/> class. /// </summary> public PageViewerWindow() { InitializeComponent(); colourTable = new ProfessionalColorTable(); colourTable.UseSystemColors = true; pfsRenderer = new PfsRenderer(new Rectangle(1, 1, 34, 34), Color.White, SystemColors.ControlDark); }
/// <summary> /// Initializes a new instance of the <see cref="AllocationMap"/> class. /// </summary> public AllocationMap() { SuspendLayout(); BackColor = Color.White; SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.DoubleBuffer, true); Padding = new Padding(1); scrollBar = new VScrollBar(); scrollBar.Enabled = false; scrollBar.Dock = DockStyle.Right; Controls.Add(scrollBar); ResumeLayout(false); MouseClick += AllocationMapPanel_MouseClick; scrollBar.ValueChanged += ScrollBar_ValueChanged; MouseMove += AllocationMapPanel_MouseMove; Resize += new EventHandler(AllocationMap_Resize); extentSize = AllocationMap.Small; imageBufferBackgroundWorker.DoWork += ImageBufferBackgroundWorker_DoWork; imageBufferBackgroundWorker.RunWorkerCompleted += ImageBufferBackgroundWorker_RunWorkerCompleted; imageBufferBackgroundWorker.ProgressChanged += ImageBufferBackgroundWorker_ProgressChanged; imageBufferBackgroundWorker.WorkerReportsProgress = true; imageBufferBackgroundWorker.WorkerSupportsCancellation = true; pageExtentRenderer = new PageExtentRenderer(Color.WhiteSmoke, Color.FromArgb(234, 234, 234)); pfsRenderer = new PfsRenderer(new Rectangle(0, 0, Large.Height, Large.Width / 8), Color.WhiteSmoke); pageExtentRenderer.CreateBrushesAndPens(ExtentSize); backgroundBrush = new LinearGradientBrush(ClientRectangle, SystemColors.Control, SystemColors.ControlLightLight, LinearGradientMode.Horizontal); backgroundBrush.WrapMode = WrapMode.TileFlipX; MapLayers = new List <AllocationLayer>(); }