private void ShowActiveEditor(bool showSplash) { if (SelectedSolutionToggle == null) { return; } if (ActiveSolutionEditor == null) { var newEditor = CreateSolutionEditor(SelectedSolutionToggle.SolutionInfo); SolutionEditors.Add(newEditor); } var activeEditorControl = (Control)ActiveSolutionEditor; if (!pnContent.Controls.Contains(activeEditorControl)) { pnContent.Controls.Add(activeEditorControl); ConfigureSolutionEditor(ActiveSolutionEditor, showSplash); ActiveSolutionEditor.LoadData(); } ActiveSolutionEditor.ShowEditor(showSplash); var rareUsedEditors = SolutionEditors.OrderByDescending(editor => editor.LastToggled).Skip(3).ToList(); foreach (var editor in rareUsedEditors) { var editorControl = (Control)editor; pnContent.Controls.Remove(editorControl); SolutionEditors.Remove(editor); editor.Release(); editorControl.Dispose(); editorControl = null; } }
private void OnSolutionToggeleClick(object sender, EventArgs e) { var solutionToggle = (SolutionImageToggle)sender; if (solutionToggle.Checked) { return; } ActiveSolutionEditor?.ApplyChanges(); SolutionToggles.ForEach(st => st.Checked = false); solutionToggle.Checked = true; }
protected override void ApplyChanges() { ActiveSolutionEditor?.ApplyChanges(); }
public override void Email() { ActiveSolutionEditor?.Email(); }
public override void OutputPdf() { ActiveSolutionEditor?.OutputPdf(); }
public override void OutputPowerPointAll() { ActiveSolutionEditor?.OutputPowerPointAll(); }