public VerseViewPresenter(VerseViewColorTheme colorTheme, Font font) { if (font == null) { throw new ArgumentNullException(nameof(font)); } this.colorTheme = colorTheme ?? throw new ArgumentNullException(nameof(colorTheme)); this.rowRenderer = new RegularRowRenderer(new Renderer(font), new VerseViewColorTheme()); this.Font = font; }
public VerseView() { SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.UserMouse | ControlStyles.Selectable | ControlStyles.Opaque // will not call OnPaintBackground | ControlStyles.StandardClick | ControlStyles.StandardDoubleClick , true); HorizontalScroll.Enabled = false; HorizontalScroll.Visible = false; VerticalScroll.Enabled = true; VerticalScroll.Visible = true; colorTheme = new VerseViewColorTheme(); presenter = new VerseViewPresenter(colorTheme, Font); }