示例#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);
		}