コード例 #1
0
 internal BackgroundThread(PrintControllerWithStatusDialog parent)
 {
     this.parent = parent;
     this.thread = new Thread(new ThreadStart(this.Run));
     this.thread.SetApartmentState(ApartmentState.STA);
     this.thread.Start();
 }
コード例 #2
0
            // 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();
            }
コード例 #3
0
            // 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;
 }
 internal BackgroundThread(PrintControllerWithStatusDialog parent)
 {
     this.parent = parent;
     this.thread = new Thread(new ThreadStart(this.Run));
     this.thread.SetApartmentState(ApartmentState.STA);
     this.thread.Start();
 }