コード例 #1
0
        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));
                }
            }
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 private void MainViewModel_TabRefresh(object sender, TabRefreshEventArgs e)
 {
     Text = "";
     SelectedBlockIndex = -1;
 }