private void Run() { try { lock (this) { if (this.alreadyStopped) { return; } this.dialog = new PrintControllerWithStatusDialog.StatusDialog(this, this.parent.dialogTitle); this.ThreadUnsafeUpdateLabel(); this.dialog.Visible = true; } if (!this.alreadyStopped) { Application.Run(this.dialog); } } finally { lock (this) { if (this.dialog != null) { this.dialog.Dispose(); this.dialog = null; } } } }
private void Run() { try { lock (this) { if (this.alreadyStopped) { return; } this.dialog = new PrintControllerWithStatusDialog.StatusDialog(this, this.parent.dialogTitle); this.ThreadUnsafeUpdateLabel(); this.dialog.Visible = true; } if (!this.alreadyStopped) { Application.Run(this.dialog); } } finally { lock (this) { if (this.dialog != null) { this.dialog.Dispose(); this.dialog = null; } } } }