public void ActivateTab(string tabName) { if (Tabnames[tabName]) { return; } IsRunning = true; try { switch (tabName) { case "connectionTab": { Tabnames[tabName] = CT.ActivateTab(); break; } case "folderTab": { Tabnames[tabName] = FT.ActivateTab(); break; } case "typesTab": { Tabnames[tabName] = TT.ActivateTab(); break; } case "secondaryTypesTab": { Tabnames[tabName] = ST.ActivateTab(); break; } case "documentTab": { Tabnames[tabName] = DT.ActivateTab(CMISSettings.CreateSchema()); break; } } } catch (Exception e) { SIEEMessageBox.Show(e.Message, "Error in " + tabName, MessageBoxImage.Error); DataLoaded = false; SelectedTab = 0; TabNamesReset(); } finally { IsRunning = false; } }