private void MainViewModel_TabRefresh(object sender, TabRefreshEventArgs e) { ComponentsEnabled = (MainViewModel.SelectedGame == Game.VCS) && (MainViewModel.CurrentSaveFile != null); Empires.Clear(); m_save = null; if (ComponentsEnabled) { m_save = (MainViewModel.CurrentSaveFile) as SaveFileVCS; for (int i = 0; i < NumEmpireSites; i++) { Empires.Add(LoadEmpire(i)); } } }
private void MainViewModel_TabRefresh(object sender, TabRefreshEventArgs e) { if (Visibility == PageVisibility.Always) { IsVisible = true; return; } switch (e.Trigger) { case TabRefreshTrigger.WindowLoaded: case TabRefreshTrigger.FileClosed: IsVisible = Visibility == PageVisibility.WhenFileClosed; break; case TabRefreshTrigger.FileLoaded: IsVisible = Visibility == PageVisibility.WhenFileLoaded; break; } }
private void MainViewModel_TabRefresh(object sender, TabRefreshEventArgs e) { Text = ""; SelectedBlockIndex = -1; }