Пример #1
0
        public HexViewer()
        {
            scrollBar = new VScrollBar {
                Dock = DockStyle.Right
            };
            Controls.Add(scrollBar);
            scrollBar.Scroll += OnScroll;

            SetStyle(ControlStyles.Selectable | ControlStyles.OptimizedDoubleBuffer |
                     ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint |
                     ControlStyles.ResizeRedraw, true);

            BackColor         = SystemColors.Window;
            ForeColor         = SystemColors.WindowText;
            BorderColor       = SystemColors.ControlText;
            HeaderColor       = SystemColors.HotTrack;
            SelectedForeColor = SystemColors.HighlightText;
            SelectedBackColor = SystemColors.Highlight;

            Font             = new Font("Consolas", 10);
            Dock             = DockStyle.Fill;
            ContextMenuStrip = new HexViewerContextMenu(this);
        }
Пример #2
0
		public HexViewer() {
			scrollBar = new VScrollBar {
				Dock = DockStyle.Right
			};
			Controls.Add(scrollBar);
			scrollBar.Scroll += OnScroll;

			SetStyle(ControlStyles.Selectable | ControlStyles.OptimizedDoubleBuffer |
			         ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint |
			         ControlStyles.ResizeRedraw, true);

			BackColor = SystemColors.Window;
			ForeColor = SystemColors.WindowText;
			BorderColor = SystemColors.ControlText;
			HeaderColor = SystemColors.HotTrack;
			SelectedForeColor = SystemColors.HighlightText;
			SelectedBackColor = SystemColors.Highlight;

			Font = new Font("Consolas", 10);
			Dock = DockStyle.Fill;
			ContextMenuStrip = new HexViewerContextMenu(this);
		}