mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
@@ -211,8 +211,8 @@ export class MainThreadModelViewDialog implements MainThreadModelViewDialogShape
|
|||||||
|
|
||||||
public $setWizardPage(wizardHandle: number, pageIndex: number): Thenable<void> {
|
public $setWizardPage(wizardHandle: number, pageIndex: number): Thenable<void> {
|
||||||
let wizard = this.getWizard(wizardHandle);
|
let wizard = this.getWizard(wizardHandle);
|
||||||
wizard.setCurrentPage(pageIndex);
|
const modal = this._dialogService.getWizardModal(wizard);
|
||||||
return Promise.resolve();
|
return modal.showPage(pageIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
public $openWizard(handle: number): Thenable<void> {
|
public $openWizard(handle: number): Thenable<void> {
|
||||||
|
|||||||
@@ -34,16 +34,14 @@ export class CustomDialogService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public closeDialog(dialog: Dialog): void {
|
public closeDialog(dialog: Dialog): void {
|
||||||
let dialogModal = this._dialogModals.get(dialog);
|
this._dialogModals.get(dialog)?.cancel();
|
||||||
if (dialogModal) {
|
|
||||||
dialogModal.cancel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeWizard(wizard: Wizard): void {
|
public closeWizard(wizard: Wizard): void {
|
||||||
let wizardModal = this._wizardModals.get(wizard);
|
this._wizardModals.get(wizard)?.cancel();
|
||||||
if (wizardModal) {
|
}
|
||||||
wizardModal.cancel();
|
|
||||||
}
|
public getWizardModal(wizard: Wizard): WizardModal | undefined {
|
||||||
|
return this._wizardModals.get(wizard);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ export class WizardModal extends Modal {
|
|||||||
page.onUpdate(() => this.setButtonsForPage(this._wizard.currentPage));
|
page.onUpdate(() => this.setButtonsForPage(this._wizard.currentPage));
|
||||||
}
|
}
|
||||||
|
|
||||||
private async showPage(index: number, validate: boolean = true, focus: boolean = false): Promise<void> {
|
public async showPage(index: number, validate: boolean = true, focus: boolean = false): Promise<void> {
|
||||||
let pageToShow = this._wizard.pages[index];
|
let pageToShow = this._wizard.pages[index];
|
||||||
if (!pageToShow) {
|
if (!pageToShow) {
|
||||||
this.done(validate).catch(err => onUnexpectedError(err));
|
this.done(validate).catch(err => onUnexpectedError(err));
|
||||||
|
|||||||
Reference in New Issue
Block a user