private void OpenSettingsExecute() { SettingsViewModel settings = ViewModelProvider.GetInstance <SettingsViewModel>(); ServiceProvider.GetInstance <InteractionService>().ShowContent(settings); UpdateConnectionStatusCommand.Execute(null); }
protected override void OnPropertyChanged(string propertyName) { base.OnPropertyChanged(propertyName); if (propertyName == GetPropertyName(() => CurrentTab)) { if (CurrentTab == "Home") { DataViewModel = ViewModelProvider.GetInstance <HomeViewModel>(); } else if (CurrentTab == "Items") { DataViewModel = ViewModelProvider.GetInstance <ItemLocalizationViewModel>(); } else if (CurrentTab == "Game Objects") { DataViewModel = ViewModelProvider.GetInstance <GameObjectLocalizationViewModel>(); } else if (CurrentTab == "Quests") { DataViewModel = ViewModelProvider.GetInstance <QuestLocalizationViewModel>(); } else { DataViewModel = null; } } }
private IViewModel GetCurrentTabViewModel() { switch (CurrentTab) { case "Home": return(ViewModelProvider.GetInstance <HomeViewModel>()); case "Items": return(ViewModelProvider.GetInstance <ItemLocalizationViewModel>()); case "Game Objects": return(ViewModelProvider.GetInstance <GameObjectLocalizationViewModel>()); case "Quests": return(ViewModelProvider.GetInstance <QuestLocalizationViewModel>()); case "BattleNet": return(ViewModelProvider.GetInstance <BattleNetLocalizationViewModel>()); default: return(null); } }