internal BackgroundThread(PrintControllerWithStatusDialog parent) { this.parent = parent; this.thread = new Thread(new ThreadStart(this.Run)); this.thread.SetApartmentState(ApartmentState.STA); this.thread.Start(); }
// Called from any thread internal BackgroundThread(PrintControllerWithStatusDialog parent) { this.parent = parent; // Calling Application.DoEvents() from within a paint event causes all sorts of problems, // so we need to put the dialog on its own thread. thread = new Thread(new ThreadStart(Run)); thread.SetApartmentState(ApartmentState.STA); thread.Start(); }
internal StatusDialog(PrintControllerWithStatusDialog.BackgroundThread backgroundThread, string dialogTitle) { this.InitializeComponent(); this.backgroundThread = backgroundThread; this.Text = dialogTitle; this.MinimumSize = base.Size; }