private void NewLoad() { layoutTab = new LayoutTab(pathTexFile); layoutTab.Dock = DockStyle.Fill; chapterTab = new SectionTab(pathTexFile, "Chapter"); chapterTab.Dock = DockStyle.Fill; sectionTab = new SectionTab(pathTexFile, "Section"); sectionTab.Dock = DockStyle.Fill; subSectionTab = new SectionTab(pathTexFile, "Subsection"); subSectionTab.Dock = DockStyle.Fill; subSubSectionTab = new SectionTab(pathTexFile, "Subsubsection"); subSubSectionTab.Dock = DockStyle.Fill; paragraphTab = new SectionTab(pathTexFile, "Paragraph"); paragraphTab.Dock = DockStyle.Fill; subParagraphTab = new SectionTab(pathTexFile, "Subparagraph"); subParagraphTab.Dock = DockStyle.Fill; titleTab = new TitleTab(pathTexFile, "Title"); titleTab.Dock = DockStyle.Fill; authorTab = new TitleTab(pathTexFile, "Author"); authorTab.Dock = DockStyle.Fill; dateTab = new TitleTab(pathTexFile, "Date"); dateTab.Dock = DockStyle.Fill; tocTab = new TocTab(pathTexFile, "toc"); tocTab.Dock = DockStyle.Fill; lofTab = new TocTab(pathTexFile, "lof"); lofTab.Dock = DockStyle.Fill; lotTab = new TocTab(pathTexFile, "lot"); lotTab.Dock = DockStyle.Fill; abstactTab = new AbstractTab(pathTexFile); abstactTab.Dock = DockStyle.Fill; allTocTab = new AllTocTab(pathTexFile); allTocTab.Dock = DockStyle.Fill; figureTab = new FigureTab(pathTexFile, "figure"); figureTab.Dock = DockStyle.Fill; tableTab = new FigureTab(pathTexFile, "table"); tableTab.Dock = DockStyle.Fill; tvMenu.SelectedNode = null; }
private bool SaveLayoutOptions() { // Validate input. foreach (var control in ColorsDockPanel.GetChildren()) { if (control is TextBox) { if (!Configuration.IsValidHtmlColor(((TextBox)control).Text)) { LayoutTab.Focus(); MessageBox.Show( "Please enter a valid HTML color code. Accepted formats are #RGB, #RRGGBB, and #AARRGGBB. Example: #3266CF", "vmPing Error", MessageBoxButton.OK, MessageBoxImage.Error); ((TextBox)control).Focus(); ((TextBox)control).SelectAll(); return(false); } } } ApplicationOptions.BackgroundColor_Probe_Inactive = BackgroundColor_Probe_Inactive.Text; ApplicationOptions.BackgroundColor_Probe_Up = BackgroundColor_Probe_Up.Text; ApplicationOptions.BackgroundColor_Probe_Down = BackgroundColor_Probe_Down.Text; ApplicationOptions.BackgroundColor_Probe_Indeterminate = BackgroundColor_Probe_Indeterminate.Text; ApplicationOptions.BackgroundColor_Probe_Error = BackgroundColor_Probe_Error.Text; ApplicationOptions.ForegroundColor_Probe_Inactive = ForegroundColor_Probe_Inactive.Text; ApplicationOptions.ForegroundColor_Probe_Up = ForegroundColor_Probe_Up.Text; ApplicationOptions.ForegroundColor_Probe_Down = ForegroundColor_Probe_Down.Text; ApplicationOptions.ForegroundColor_Probe_Indeterminate = ForegroundColor_Probe_Indeterminate.Text; ApplicationOptions.ForegroundColor_Probe_Error = ForegroundColor_Probe_Error.Text; ApplicationOptions.ForegroundColor_Stats_Inactive = ForegroundColor_Stats_Inactive.Text; ApplicationOptions.ForegroundColor_Stats_Up = ForegroundColor_Stats_Up.Text; ApplicationOptions.ForegroundColor_Stats_Down = ForegroundColor_Stats_Down.Text; ApplicationOptions.ForegroundColor_Stats_Indeterminate = ForegroundColor_Stats_Indeterminate.Text; ApplicationOptions.ForegroundColor_Stats_Error = ForegroundColor_Stats_Error.Text; ApplicationOptions.ForegroundColor_Alias_Inactive = ForegroundColor_Alias_Inactive.Text; ApplicationOptions.ForegroundColor_Alias_Up = ForegroundColor_Alias_Up.Text; ApplicationOptions.ForegroundColor_Alias_Down = ForegroundColor_Alias_Down.Text; ApplicationOptions.ForegroundColor_Alias_Indeterminate = ForegroundColor_Alias_Indeterminate.Text; ApplicationOptions.ForegroundColor_Alias_Error = ForegroundColor_Alias_Error.Text; return(true); }
private void SelectTab(int index) { _selectedIndex = index; SelectedTab = Layout.tab[index]; StateHasChanged(); }
public void Visit(LayoutTab tab) { Array.ForEach(tab.row, r => r.Accept(this)); }