private void ShowLoading() { SetActivePage(_wizardPageLoading); bBack.IsEnabled = false; bNext.IsEnabled = false; _temporarySqlContext.MetadataProvider = Connection.MetadataProvider; _temporarySqlContext.SyntaxProvider = Connection.SyntaxProvider; TemporaryMetadataContainer.Items.SetLoaded(MetadataType.All, false); if (_wizardPageWelcome.cbClearBeforeLoading.IsChecked == true) { EditedMetadataContainer.Items.Clear(); TemporaryMetadataContainer.Items.Clear(); } TemporaryMetadataContainer.LoadingOptions.LoadDefaultDatabaseOnly = false; TemporaryMetadataContainer.LoadingOptions.LoadSystemObjects = false; var databasesToLoad = new List <string>(); if ((!Connection.SyntaxProvider.IsSupportDatabases() || _databases.Count == 0) && DefaultDatabase != null) { databasesToLoad.Add(DefaultDatabase); } else { foreach (DatabaseObjectForListbox checkedItem in _wizardPageLoadOpts.CheckedItems) { databasesToLoad.Add(checkedItem.Database); } } _loader = new MetadataLoader(TemporaryMetadataContainer, databasesToLoad) { LoadFields = LoadFields }; _loader.DatabaseLoadingStart += LoaderOnDatabaseLoadingStart; _loader.LoadingFinished += LoadingFinished; _loader.LoadingFailed += LoadingFailed; _loader.EntitiesLoaded += EntitiesLoaded; _loader.Start(); }