public void UpdateSettingsAccordingDataChanges(SectionEditorType editorType) { switch (editorType) { case SectionEditorType.Schedule: _settingsControls.OfType <SectionColumnSettingsControl>().First().UpdateUniversalSettingsToggleVisibility(); break; case SectionEditorType.CustomSummary: _settingsControls.OfType <CustomSummaryInfoControl>().First().UpdateTotals(); break; } }
public void UpdateSettingsAccordingSelectedSectionEditor(SectionEditorType editorType) { var selectedTabPage = xtraTabControlOptions.SelectedTabPage; xtraTabControlOptions.TabPages.Clear(); var contentRelation = _sectionEditorSettings.FirstOrDefault(r => r.EditorType == editorType); if (contentRelation != null) { xtraTabControlOptions.TabPages.AddRange(_settingsControls .Where(sc => sc.IsAvailable && contentRelation.SettingsTypes.Contains(sc.SettingsType)) .OrderBy(sc => sc.Order) .OfType <XtraTabPage>() .Where(tp => tp.PageVisible) .ToArray()); if (selectedTabPage != null && xtraTabControlOptions.TabPages.Contains(selectedTabPage)) { xtraTabControlOptions.SelectedTabPage = selectedTabPage; } } SettingsControlsUpdated?.Invoke(this, EventArgs.Empty); }
public void UpdateSettingsAccordingDataChanges(SectionEditorType editorType) { switch (editorType) { case SectionEditorType.Schedule: _settingsControls.OfType<SectionColumnSettingsControl>().First().UpdateUniversalSettingsToggleVisibility(); break; case SectionEditorType.CustomSummary: _settingsControls.OfType<CustomSummaryInfoControl>().First().UpdateTotals(); break; } }
public void UpdateSettingsAccordingSelectedSectionEditor(SectionEditorType editorType) { var selectedTabPage = xtraTabControlOptions.SelectedTabPage; xtraTabControlOptions.TabPages.Clear(); var contentRelation = _sectionEditorSettings.FirstOrDefault(r => r.EditorType == editorType); if (contentRelation != null) { xtraTabControlOptions.TabPages.AddRange(_settingsControls .Where(sc => sc.IsAvailable && contentRelation.SettingsTypes.Contains(sc.SettingsType)) .OrderBy(sc => sc.Order) .OfType<XtraTabPage>() .Where(tp => tp.PageVisible) .ToArray()); if (selectedTabPage != null && xtraTabControlOptions.TabPages.Contains(selectedTabPage)) xtraTabControlOptions.SelectedTabPage = selectedTabPage; } hyperLinkEditInfoAdvanced.Visible = contentRelation != null && contentRelation.SettingsTypes.Contains(ScheduleSettingsType.AdvancedColumns); hyperLinkEditInfoAdvanced.BringToFront(); hyperLinkEditInfoContract.Visible = BusinessObjects.Instance.OutputManager.ContractTemplateFolder.ExistsLocal() && contentRelation != null && contentRelation.SettingsTypes.Contains(ScheduleSettingsType.Contract); hyperLinkEditInfoContract.BringToFront(); SettingsControlsUpdated?.Invoke(this, EventArgs.Empty); }