private void AddFakeTab() { PreviewTab tab = new PreviewTab(this, new PreparedPages(null), ""); tab.Fake = true; FDocuments.Add(tab); tab.AddToTabControl(tabControl); }
internal void AddPreviewTab(PreparedPages pages, string text) { PreviewTab tab = new PreviewTab(this, pages, text); FDocuments.Add(tab); pages.ClearPageCache(); OutlineVisible = !pages.Outline.IsEmpty; tab.AddToTabControl(tabControl); tab.UnlockLayout(); UpdateTabsVisible(); tab.UpdatePages(); // do not stole the focus tabControl.TabStrip.AutoSelectAttachedControl = false; tabControl.SelectedTab = tab; tabControl.TabStrip.AutoSelectAttachedControl = true; if (FDocuments.Count == 2 && FDocuments[0].Fake) { DeleteTab(FDocuments[0]); } }