Change Azure region dropdown to use azurecore API (#11131)

* Change Azure region dropdown to use azurecore API for getting display name

* Fix compile errors

* Adding a few things to the vscodeignore

* and another
This commit is contained in:
Charles Gagnon
2020-06-29 12:44:04 -07:00
committed by GitHub
parent e540096e07
commit 064ada1d2f
13 changed files with 70 additions and 90 deletions

View File

@@ -24,14 +24,14 @@ export abstract class WizardBase<T, P extends WizardPageBase<T>, M extends Model
this.wizardObject = azdata.window.createWizard(title);
}
public open(): Thenable<void> {
public async open(): Promise<void> {
this.initialize();
this.wizardObject.customButtons = this.customButtons;
this.toDispose.push(this.wizardObject.onPageChanged((e) => {
this.toDispose.push(this.wizardObject.onPageChanged(async (e) => {
let previousPage = this.pages[e.lastPage];
let newPage = this.pages[e.newPage];
previousPage.onLeave();
newPage.onEnter();
await newPage.onEnter();
}));
this.toDispose.push(this.wizardObject.doneButton.onClick(async () => {
@@ -43,12 +43,10 @@ export abstract class WizardBase<T, P extends WizardPageBase<T>, M extends Model
this.dispose();
}));
return this.wizardObject.open().then(() => {
if (this.pages && this.pages.length > 0) {
this.pages[0].onEnter();
}
});
await this.wizardObject.open();
if (this.pages && this.pages.length > 0) {
await this.pages[0].onEnter();
}
}
protected abstract initialize(): void;