public void OpenPreview(Action <string, Color> logMessage) { if (previewForm == null || previewForm.IsDisposed) { previewPicture = new PictureBox(); previewPicture.Dock = DockStyle.Fill; previewPicture.Image = Resources.OpenFL; previewPicture.SizeMode = PictureBoxSizeMode.Zoom; StyleManager.RegisterControl(previewPicture, "default", "preview"); previewForm = ContainerForm.CreateContainer( previewPicture, null, "Preview: ", Resources.OpenFL_Icon, FormBorderStyle.SizableToolWindow ); ComputePreview(logMessage); } else { previewForm.Show(); } }
public static (Form, Panel) CreateProgressForm() { Panel parent = CreateProgressPanel(); ContainerForm c = new ContainerForm( parent, null, "Unpacking", SystemIcons.Application, FormBorderStyle.SizableToolWindow, new Size(1, 1), new Size(3000, 3000) ); c.Show(); c.Size = new Size(700, 600); return(c, parent); }