예제 #1
0
 private void OnSave()
 {
     SessionSerialization.SaveConfig(SessionConfigParams);
     ConfigName = "Save successful!";
     System.Threading.Thread.Sleep(1000);
     Done();
 }
예제 #2
0
 private void OnLoad()
 {
     LoadedNumTeams = 0;
     try
     {
         _loadedSession   = SessionSerialization.LoadSession(_scorerRepo, SelectedConfigName);
         LoadedConfigName = SelectedConfigName;
         LoadedScorers    = new ObservableCollection <Scorer>(_loadedSession.Scorers);
         foreach (var s in LoadedScorers)
         {
             LoadedNumTeams += s.Teams.Count;
         }
         UseConfigCommand.RaiseCanExecuteChanged();
     }
     catch (InvalidCastException)
     {
         FailedLoadError(SelectedConfigName);
     }
 }
예제 #3
0
 private void OnStart()
 {
     SessionSerialization.SaveConfig(_sessionConfigParams);
     StartSessionRequested(_sessionConfigParams);
 }