public CommitInfo() { InitializeComponent(); Translate(); GitUICommandsSourceSet += (a, uiCommandsSource) => { _sortedRefs = null; }; _commitDataManager = new CommitDataManager(() => Module); IHeaderRenderStyleProvider headerRenderer; IHeaderLabelFormatter labelFormatter; if (EnvUtils.IsMonoRuntime()) { labelFormatter = new MonospacedHeaderLabelFormatter(); headerRenderer = new MonospacedHeaderRenderStyleProvider(); } else { labelFormatter = new TabbedHeaderLabelFormatter(); headerRenderer = new TabbedHeaderRenderStyleProvider(); } _commitDataHeaderRenderer = new CommitDataHeaderRenderer(labelFormatter, _dateFormatter, headerRenderer, _linkFactory); _commitDataBodyRenderer = new CommitDataBodyRenderer(() => Module, _linkFactory); RevisionInfo.Font = AppSettings.Font; using (Graphics g = CreateGraphics()) { _RevisionHeader.Font = _commitDataHeaderRenderer.GetFont(g); } _RevisionHeader.SelectionTabs = _commitDataHeaderRenderer.GetTabStops().ToArray(); }
public CommitInfo() { InitializeComponent(); Translate(); GitUICommandsSourceSet += (a, uiCommandsSource) => { _sortedRefs = null; }; _commitDataManager = new CommitDataManager(() => Module); IHeaderRenderStyleProvider headerRenderer; IHeaderLabelFormatter labelFormatter; if (EnvUtils.IsMonoRuntime()) { labelFormatter = new MonospacedHeaderLabelFormatter(); headerRenderer = new MonospacedHeaderRenderStyleProvider(); } else { labelFormatter = new TabbedHeaderLabelFormatter(); headerRenderer = new TabbedHeaderRenderStyleProvider(); } _commitDataHeaderRenderer = new CommitDataHeaderRenderer(labelFormatter, _dateFormatter, headerRenderer, _linkFactory); _commitDataBodyRenderer = new CommitDataBodyRenderer(() => Module, _linkFactory); _externalLinksLoader = new ExternalLinksLoader(); _effectiveLinkDefinitionsProvider = new ConfiguredLinkDefinitionsProvider(_externalLinksLoader); _gitRevisionExternalLinksParser = new GitRevisionExternalLinksParser(_effectiveLinkDefinitionsProvider); RevisionInfo.Font = AppSettings.Font; using (Graphics g = CreateGraphics()) { _RevisionHeader.Font = _commitDataHeaderRenderer.GetFont(g); } _RevisionHeader.SelectionTabs = _commitDataHeaderRenderer.GetTabStops().ToArray(); Hotkeys = HotkeySettingsManager.LoadHotkeys(FormBrowse.HotkeySettingsName); addNoteToolStripMenuItem.ShortcutKeyDisplayString = GetShortcutKeys((int)FormBrowse.Commands.AddNotes).ToShortcutKeyDisplayString(); }
public void Setup() { _formatter = new MonospacedHeaderLabelFormatter(); }