private void AddViewer(FileViewer fileViewer) { if (fileViewer != null) { fileViewer.Dock = DockStyle.Fill; fileViewer.Visible = false; splitContainer.Panel2.Controls.Add(fileViewer); fileViewers.Add(fileViewer.GetType().AssemblyQualifiedName, fileViewer); } }