public override void Assign(DatabaseObjectInfo source) { base.Assign(source); var src = (TableInfo)source; if (src.PrimaryKey != null) { PrimaryKey = src.PrimaryKey.ClonePrimaryKey(this); } foreach (var fk in src.ForeignKeys) { ForeignKeys.Add(fk.CloneForeignKey(this)); } foreach (var ix in src.Indexes) { Indexes.Add(ix.CloneIndex(this)); } foreach (var ix in src.Uniques) { Uniques.Add(ix.CloneUnique(this)); } foreach (var ch in src.Checks) { Checks.Add(ch.CloneCheck(this)); } }
void PuzzleFinished(SubmittedMoveResponse response, bool correct) { CurrentPuzzleEndedUtc = DateTime.UtcNow; response.Correct = correct ? 1 : -1; response.ExplanationSafe = Current.ExplanationSafe; PastPuzzleIds.Add(Current.ID); if (!correct) { Moves.RemoveAt(Moves.Count - 1); FENs.RemoveAt(FENs.Count - 1); Checks.RemoveAt(Checks.Count - 1); response.FEN = FENs[FENs.Count - 1]; ChessGame correctGame = gameConstructor.Construct(Current.Variant, response.FEN); foreach (string move in PossibleVariations.First()) { string[] p = move.Split('-', '='); correctGame.ApplyMove(new Move(p[0], p[1], correctGame.WhoseTurn, p.Length == 2 ? null : new char?(p[2][0])), true); FENs.Add(correctGame.GetFen()); Checks.Add(correctGame.IsInCheck(correctGame.WhoseTurn) ? correctGame.WhoseTurn.ToString().ToLowerInvariant() : null); Moves.Add(move); } } response.ReplayFENs = FENs; response.ReplayChecks = Checks; response.ReplayMoves = Moves; }
/// <summary> /// Создает Чек /// </summary> /// <param name="customer">Покупатель</param> /// <param name="date">Дата</param> static public Check MakeCheck(Customer customer, DateTime date) { Checks.Add(new Check(customer, date)); ChecksListUpdated?.Invoke(Checks.Last()); return(Checks.Last()); }
public RequiredValidator(TControl control, TextBlock error_block, Func <TControl, bool> has_value, params Func <TControl, string>[] checks) : base(control, error_block) { Checks.Add(control => has_value(control) ? "" : "Error: This field is required."); foreach (Func <TControl, string> check in checks) { Checks.Add(check); } }
public void SetCommonCheck(CheckViewModel checkVM) { var friendVM = new FriendViewModel(new Friend() { Name = PageTitles.COMMON_CHECK, Image = ImageSource.FromResource(ImagePaths.Checks) }); Checks.Add(new FriendCheckViewModel(friendVM, checkVM.Check)); }
/// <summary> /// 添加考勤记录 /// </summary> /// <param name="obj"></param> public void Add(CHECKINOUT obj) { Checks.Add(obj); var emp = EmpChecks.Where(p => p.CheckDate == obj.CHECKTIME.Date).SingleOrDefault(); if (emp != null) { emp.Add(obj); } }
/// <summary> /// Handler for an event when we request central path from Revit. We need that path, for the /// current document to obtain proper settings from MissionControlSetup. /// </summary> /// <param name="obj"></param> private void OnCentralPathObtained(CentralPathObtained obj) { Model.CentralPath = obj.CentralPath; lock (_lock) { Checks.Clear(); foreach (var check in Model.CollectChecks((FamilyItem)Wrapper.Element)) { Checks.Add(check); } } }
public DataContext() { Database.EnsureCreated(); Instance = this; Products.Add(new Product()); Checks.Add(new Check()); Customers.Add(new Customer()); Employees.Add(new Employee()); DailyReports.Add(new DailyReport()); ProductUnits.Add(new ProductUnit()); Shops.Add(new Shop()); }
private void OnAddNewItem(object sender, EventArgs e) { Check check = new Check { Number = Checks.Max(c => c.Number) + 1, Amount = 0, Date = DateTime.Now }; Checks.Add(check); TableView.ReloadData(); using (NSIndexPath indexPath = NSIndexPath.FromRowSection(Checks.Count - 1, 0)) TableView.SelectRow(indexPath, true, UITableViewScrollPosition.None); PerformSegue("showDetails", this); }
public void Setup(Puzzle puzzle) { Current = puzzle; CurrentPuzzleStartedUtc = DateTime.UtcNow; CurrentPuzzleEndedUtc = null; PossibleVariations = puzzle.Solutions.Select(x => x.Split(' ')); FENs.Clear(); FENs.Add(puzzle.InitialFen); Checks.Clear(); Checks.Add(Current.Game.IsInCheck(Current.Game.WhoseTurn) ? Current.Game.WhoseTurn.ToString().ToLowerInvariant() : null); Moves.Clear(); Moves.Add(null); }
private void InitializeConfig() { try { Checks.Add(new SystemStatsCheck()); _networkTrafficCheck = new NetworkTrafficCheck(); Checks.Add(_networkTrafficCheck); Checks.Add(new DriveInfoBasedDiskUsageCheck()); Checks.Add(new ProcessorCheck()); Checks.Add(new ProcessCheck()); Checks.Add(new PhysicalMemoryFreeCheck()); Checks.Add(new PhysicalMemoryUsedCheck()); Checks.Add(new PhysicalMemoryCachedCheck()); Checks.Add(new SwapMemoryFreeCheck()); Checks.Add(new SwapMemoryUsedCheck()); Checks.Add(new IOCheck()); if (_config.IISStatus) { Checks.Add(new IISCheck()); } if (_config.PluginDirectory != null && Directory.Exists(_config.PluginDirectory)) { Checks.Add(new PluginCheck(_config.PluginDirectory)); } if (_config.SQLServerStatus) { Checks.Add(new SQLServerCheck(_config.CustomPrefix)); } if (!string.IsNullOrEmpty(_config.MongoDBConnectionString)) { Checks.Add(new ExtendedMongoDBCheck(_config.MongoDBConnectionString, _config.MongoDBReplSet, _config.MongoDBDBStats)); } // flag check if (Agent.Flags.ContainsKey("FlagCheck")) { Log.Warn("Flag check activated"); } } catch (Exception ex) { Log.Error(ex); } }
public IntValidator(TextBox control, TextBlock error_block, bool required, int?min, int?max, params Func <TextBox, string>[] checks) : this(control, error_block, checks) { if (required) { Checks.Add(c => c.Text == "" ? "Error: This field is required." : ""); } if (min != null) { Checks.Add(c => int.Parse(c.Text) < (int)min ? "Error: Number must be at least " + (int)min + '.' : ""); } if (max != null) { Checks.Add(c => int.Parse(c.Text) > (int)max ? "Error: Number must be at most " + (int)max + '.' : ""); } }
public IntValidator(TextBox control, TextBlock error_block, params Func <TextBox, string>[] checks) : base(control, error_block, checks) { Checks.Add( c => { try { c.Text = string.IsNullOrWhiteSpace(c.Text) ? "" : int.Parse(c.Text).ToString(); return(""); } catch (FormatException) { return("Error: Input must be a number."); } catch (OverflowException) { return("Error: Number is too large."); } } ); }
public PhoneValidator(TextBox control, TextBlock error_block, params Func <TextBox, string>[] checks) : base(control, error_block) { Checks.Add( control => { try { control.Text = new Phone(control.Text); return(""); } catch (InvalidPhoneException ex) { return(ex.Message); } } ); foreach (Func <TextBox, string> check in checks) { Checks.Add(check); } }
public PasswordValidator(PasswordBox control, TextBlock error_block, params Func <PasswordBox, string>[] checks) : base(control, error_block, p => !string.IsNullOrEmpty(p.Password)) { Checks.Add( c => { try { c.Password = new Password(c.Password); return(""); } catch (InvalidPasswordException ex) { return(ex.Message); } } ); foreach (Func <PasswordBox, string> check in checks) { Checks.Add(check); } }
public void CanAdd(string checkId, string val, string id) { var env = new Ex.Env(); var checks = new Checks(env); var checks2 = checks.Add(checkId, val); Assert.Same(checks, checks2); var inspectors = checks.GetInspectors <Mocks.Inspector>(); Assert.NotEmpty(inspectors); var check = inspectors.First(); Assert.Equal(id, check.Id); Assert.False(check.Ok); }
public IDValidator(TextBox control, TextBlock error_block, int digits, params Func <TextBox, string>[] checks) : base(control, error_block) { Digits = digits; Checks.Add( c => { try { c.Text = new ID(c.Text, Digits); return(""); } catch (FormatException) { return("Error: ID must contain only digits."); } catch (Exception ex) when(ex is IncorrectDigitsException || ex is OverflowException) { return("Error: ID must have precisely " + Digits + " digits."); } } ); foreach (Func <TextBox, string> check in checks) { Checks.Add(check); } }
public void PrependsRootToAllChecks(params string[] checkIds) { var env = new Ex.Env(); var checks = new Checks(env).AddRoots("root"); foreach (var checkId in checkIds) { checks.Add(checkId, "/" + checkId + ".asdf"); } var inspectors = checks.GetInspectors <Mocks.Inspector>().ToList(); Assert.Equal(checkIds.Length, inspectors.Count()); for (var i = 0; i < checkIds.Length; ++i) { var inspector = inspectors[i] as Mocks.Inspector; Assert.Equal("MOCK_" + checkIds[i].ToUpperInvariant() + "_ID", inspector.Id); var v = "root/" + checkIds[i] + ".asdf"; Assert.Equal(v, inspector.Value); } }
public IConfigurationBuilder WithHealthCheck(Func <HealthCheck> check) { Checks.Add(() => Task.FromResult(check())); return(this); }
public IConfigurationBuilder WithHealthCheck(Func <Task <HealthCheck> > check) { Checks.Add(check); return(this); }
/// <summary> /// Adds a check to <see cref="Checks"/>. /// </summary> public ParameterBuilder AddCheck(ParameterCheckAttribute check) { Checks.Add(check); return(this); }
public SubmittedMoveResponse ApplyMove(string origin, string destination, string promotion) { SubmittedMoveResponse response = new SubmittedMoveResponse() { Success = true, Error = null }; if (promotion != null && promotion.Length != 1) { response.Success = false; response.Error = "Invalid promotion."; response.Correct = SubmittedMoveResponse.INVALID_MOVE; return(response); } MoveType type = Current.Game.ApplyMove(new Move(origin, destination, Current.Game.WhoseTurn, promotion?[0]), false); if (type == MoveType.Invalid) { response.Success = false; response.Error = "Invalid move."; response.Correct = SubmittedMoveResponse.INVALID_MOVE; } response.Check = Current.Game.IsInCheck(Current.Game.WhoseTurn) ? Current.Game.WhoseTurn.ToString().ToLowerInvariant() : null; Checks.Add(response.Check); string fen = Current.Game.GetFen(); response.FEN = fen; FENs.Add(fen); string promotionUpper = promotion?.ToUpperInvariant(); Moves.Add(string.Format("{0}-{1}={2}", origin, destination, promotion == null ? "" : "=" + promotionUpper)); if (Current.Game.IsWinner(ChessUtilities.GetOpponentOf(Current.Game.WhoseTurn))) { PuzzleFinished(response, true); return(response); } string moveStr = origin + "-" + destination + (promotion != null ? "=" + promotionUpper : ""); if (!PossibleVariations.Any(x => string.Compare(x.First(), moveStr, true) == 0)) { PuzzleFinished(response, false); return(response); } PossibleVariations = PossibleVariations.Where(x => string.Compare(x.First(), moveStr, true) == 0).Select(x => x.Skip(1)); if (PossibleVariations.Any(x => x.Count() == 0)) { PuzzleFinished(response, true); return(response); } response.FEN = fen; string moveToPlay = PossibleVariations.First().First(); string[] parts = moveToPlay.Split('-', '='); Current.Game.ApplyMove(new Move(parts[0], parts[1], Current.Game.WhoseTurn, parts.Length == 2 ? null : new char?(parts[2][0])), true); response.Play = moveToPlay; Moves.Add(moveToPlay); response.FenAfterPlay = Current.Game.GetFen(); FENs.Add(response.FenAfterPlay); response.CheckAfterAutoMove = Current.Game.IsInCheck(Current.Game.WhoseTurn) ? Current.Game.WhoseTurn.ToString().ToLowerInvariant() : null; Checks.Add(response.CheckAfterAutoMove); response.Moves = Current.Game.GetValidMoves(Current.Game.WhoseTurn); response.Correct = 0; PossibleVariations = PossibleVariations.Select(x => x.Skip(1)); if (PossibleVariations.Any(x => !x.Any())) { PuzzleFinished(response, true); } return(response); }
SubmittedMoveResponse MakeMoveAndDropCommon(SubmittedMoveResponse response, string moveStr) { response.Check = Current.Game.IsInCheck(Current.Game.WhoseTurn) ? Current.Game.WhoseTurn.ToString().ToLowerInvariant() : null; Checks.Add(response.Check); string fen = Current.Game.GetFen(); response.FEN = fen; FENs.Add(fen); Dictionary <string, int> pocket = Current.Game.GenerateJsonPocket(); response.Pocket = pocket; Pockets.Add(pocket); if (Current.Game.IsWinner(ChessUtilities.GetOpponentOf(Current.Game.WhoseTurn))) { PuzzleFinished(response, true); return(response); } if (!PossibleVariations.Any(x => CompareMoves(x.First(), moveStr) == 0)) { PuzzleFinished(response, false); return(response); } PossibleVariations = PossibleVariations.Where(x => CompareMoves(x.First(), moveStr) == 0).Select(x => x.Skip(1)); if (PossibleVariations.Any(x => x.Count() == 0)) { PuzzleFinished(response, true); return(response); } string moveToPlay = PossibleVariations.First().First(); if (!moveToPlay.Contains("@")) { string[] parts = moveToPlay.Split('-', '='); Current.Game.MakeMove(new Move(parts[0], parts[1], Current.Game.WhoseTurn, parts.Length == 2 ? null : new char?(parts[2][0])), true); } else { string[] parts = moveToPlay.Split('@'); CrazyhouseChessGame zhCurrent = Current.Game as CrazyhouseChessGame; Piece toDrop = zhCurrent.MapPgnCharToPiece(parts[0] == "" ? 'P' : parts[0][0], zhCurrent.WhoseTurn); Drop drop = new Drop(toDrop, new Position(parts[1]), zhCurrent.WhoseTurn); zhCurrent.ApplyDrop(drop, true); } response.Play = moveToPlay; Moves.Add(moveToPlay); response.FenAfterPlay = Current.Game.GetFen(); FENs.Add(response.FenAfterPlay); response.CheckAfterAutoMove = Current.Game.IsInCheck(Current.Game.WhoseTurn) ? Current.Game.WhoseTurn.ToString().ToLowerInvariant() : null; Checks.Add(response.CheckAfterAutoMove); response.Moves = Current.Game.GetValidMoves(Current.Game.WhoseTurn); response.Correct = 0; response.PocketAfterAutoMove = Current.Game.GenerateJsonPocket(); Pockets.Add(response.PocketAfterAutoMove); PossibleVariations = PossibleVariations.Select(x => x.Skip(1)); if (PossibleVariations.Any(x => !x.Any())) { PuzzleFinished(response, true); } return(response); }
public void AddConstraint(ConstraintInfo cnt, bool reuseGrouId = false) { var primaryKeyInfo = cnt as PrimaryKeyInfo; if (primaryKeyInfo != null) { PrimaryKey = primaryKeyInfo.ClonePrimaryKey(this); if (!reuseGrouId) { PrimaryKey.GroupId = Guid.NewGuid().ToString(); } PrimaryKey.OwnerTable = this; } var foreignKeyInfo = cnt as ForeignKeyInfo; if (foreignKeyInfo != null) { var fknew = foreignKeyInfo.CloneForeignKey(this); if (!reuseGrouId) { fknew.GroupId = Guid.NewGuid().ToString(); } ForeignKeys.Add(fknew); fknew.OwnerTable = this; } var indexInfo = cnt as IndexInfo; if (indexInfo != null) { var ixnew = indexInfo.CloneIndex(this); if (!reuseGrouId) { ixnew.GroupId = Guid.NewGuid().ToString(); } Indexes.Add(ixnew); ixnew.OwnerTable = this; } var uniqueInfo = cnt as UniqueInfo; if (uniqueInfo != null) { var uqnew = uniqueInfo.CloneUnique(this); if (!reuseGrouId) { uqnew.GroupId = Guid.NewGuid().ToString(); } Uniques.Add(uqnew); uqnew.OwnerTable = this; } var checkInfo = cnt as CheckInfo; if (checkInfo != null) { var chnew = checkInfo.CloneCheck(this); if (!reuseGrouId) { chnew.GroupId = Guid.NewGuid().ToString(); } Checks.Add(chnew); chnew.OwnerTable = this; } }
public EndResultViewModel(ShellViewModel conductor, SimpleContainer container) { this.conductor = conductor; this.container = container; timer.Tick += Timer_Tick; timer.Interval = TimeSpan.FromSeconds(5); alleScores = new List <Scores>(); var gespeeldeOpdrachtenIds = new List <string>(); aantalPasvragenPerNaam = new Dictionary <string, int>(); foreach (var dag in container.GetInstance <ShellViewModel>().DagenData.Dagen) { Checks.Add(new CheckViewModel($"Administratie saved {dag.Naam} :", Util.DataFileFoundAndValid <AdminData>(dag.Id))); var adminadata = Util.SafeReadJson <AdminData>(dag.Id); foreach (var gespeeldeOpdrachtData in adminadata.OpdrachtenGespeeld) { gespeeldeOpdrachtenIds.Add(gespeeldeOpdrachtData.OpdrachtId); } foreach (var pasvragenVerdiend in adminadata.Pasvragen) { var naam = pasvragenVerdiend.Naam; if (aantalPasvragenPerNaam.ContainsKey(naam)) { aantalPasvragenPerNaam[naam] += pasvragenVerdiend.PasVragenVerdiend; } else { aantalPasvragenPerNaam.Add(naam, pasvragenVerdiend.PasVragenVerdiend); } } } gespeeldeOpdrachten = Util.AlleOpdrachtData().Where(od => gespeeldeOpdrachtenIds.Any(i => i == od.Opdracht)) .ToList(); alleAntwoordenPerOpdrachtId = new Dictionary <string, AntwoordenData>(); alleJuisteAntwoorden = new Dictionary <string, string>(); molPerOpdrachtId = new Dictionary <string, string>(); radersPerOpdrachtId = new Dictionary <string, string>(); aantalRadersPerOpdrachtId = new Dictionary <string, int>(); groepspot = 0; maxTeVerdienen = 0; foreach (var opdrachtData in gespeeldeOpdrachten) { var antwoordengevonden = Util.DataFileFoundAndValid <AntwoordenData>(opdrachtData.Opdracht); Checks.Add(new CheckViewModel($"Antwoorden saved {Util.OpdrachtUiNaam(opdrachtData)} :", antwoordengevonden)); if (antwoordengevonden) { var antwoorden = Util.SafeReadJson <AntwoordenData>(opdrachtData.Opdracht); alleAntwoordenPerOpdrachtId.Add(opdrachtData.Opdracht, antwoorden); Checks.Add(new CheckViewModel( $"Opdracht {Util.OpdrachtUiNaam(opdrachtData)}: Aantal Antwoorden: {antwoorden.Spelers.Count}", antwoorden.Spelers.Count == container.GetInstance <ShellViewModel>().AantalSpelers)); Checks.Add(new CheckViewModel( $"Opdracht {Util.OpdrachtUiNaam(opdrachtData)}: Aantal Mollen: {antwoorden.Spelers.Count(s => s.IsDeMol)}", antwoorden.Spelers.Count(s => s.IsDeMol) == 1)); Checks.Add(new CheckViewModel($"Dubbel geantwoord in opdracht {Util.OpdrachtUiNaam(opdrachtData)}:", Util.CheckForDoubles(antwoorden.Spelers))); if (Checks.Any(c => !c.IsOk)) { continue; } groepspot += antwoorden.EffectiefVerdiend; maxTeVerdienen += antwoorden.MaxTeVerdienen; var molNaam = antwoorden.Spelers.First(s => s.IsDeMol)?.Naam ?? "?"; molPerOpdrachtId.Add(opdrachtData.Opdracht, molNaam); foreach (var juistAntwoord in antwoorden.Spelers.First(s => s.IsDeMol).Antwoorden) { alleJuisteAntwoorden.Add(juistAntwoord.Key, juistAntwoord.Value); } var aantalRaders = antwoorden .Spelers .Where(s => !s.IsDeMol) .Count(s => s.DeMolIs.SafeEqual(molNaam)); aantalRadersPerOpdrachtId.Add(opdrachtData.Opdracht, aantalRaders); var radersLijst = string.Join(", ", antwoorden.Spelers .Where(s => !s.IsDeMol) .Where(s => s.DeMolIs.SafeEqual(molNaam)).Select(s => s.Naam)); radersPerOpdrachtId.Add(opdrachtData.Opdracht, radersLijst); } } //finaleantwoordenData = Util.SafeReadJson<FinaleAntwoordenData>(); // var finaleDoorIedereenGespeeld = finaleantwoordenData.Spelers.Count == // container.GetInstance<ShellViewModel>().AantalSpelers; // Checks.Add(new CheckViewModel($"Finale: Aantal Antwoorden: {finaleantwoordenData.Spelers.Count}", // finaleDoorIedereenGespeeld)); //if (finaleDoorIedereenGespeeld) { foreach (var speler in container.GetInstance <ShellViewModel>().Spelerdata.Spelers) { var scores = new Scores(); scores.Naam = speler.Naam; scores.totaleTijd = TimeSpan.Zero; var pasvragenVerdiend = aantalPasvragenPerNaam.Any(kvp => kvp.Key.SafeEqual(speler.Naam)) ? aantalPasvragenPerNaam.Single(kvp => kvp.Key.SafeEqual(speler.Naam)).Value : 0; scores.aantalPasVragenVerdiend = pasvragenVerdiend; foreach (var opdrachtData in gespeeldeOpdrachten) { if (alleAntwoordenPerOpdrachtId.ContainsKey(opdrachtData.Opdracht)) { var antwoorden = alleAntwoordenPerOpdrachtId[opdrachtData.Opdracht]; var a = antwoorden.Spelers.FirstOrDefault(s => s.Naam.SafeEqual(speler.Naam)); if (a != null) { scores.totaleTijd += a.Tijd; if (a.IsDeMol) { if (aantalRadersPerOpdrachtId.ContainsKey(opdrachtData.Opdracht) && aantalRadersPerOpdrachtId[opdrachtData.Opdracht] < Settings.Default.AantalSpelersDieDeMolMoetenGeradenHebben) { scores.verdiendAlsMol += antwoorden.MaxTeVerdienen - antwoorden.EffectiefVerdiend; } scores.aantalKeerMolGeweest++; continue; } foreach (var antwoord in a.Antwoorden) { scores.aantalVragenBeantwoord++; var juistAntwoord = alleJuisteAntwoorden.ContainsKey(antwoord.Key) ? alleJuisteAntwoorden[antwoord.Key] : "?"; if (antwoord.Value.SafeEqual(juistAntwoord)) { scores.aantalVragenJuistBeantwoord++; } } } } } //var finaleAntwoorden = finaleantwoordenData.Spelers.Single(s => s.Naam.SafeEqual(speler.Naam)); //scores.totaleTijd += finaleAntwoorden.Tijd; // foreach (var demolIsPerOpdrachtId in finaleAntwoorden.DeMolIsPerOpdrachtId) // { // scores.finaleAantalVragenBeantwoord++; // // if (molPerOpdrachtId.ContainsKey(demolIsPerOpdrachtId.Key) // && molPerOpdrachtId[demolIsPerOpdrachtId.Key].SafeEqual(demolIsPerOpdrachtId.Value)) // { // scores.finaleAantalVragenJuistBeantwoord++; // } // } // foreach (var antwoordenPerVraagId in finaleAntwoorden.AntwoordenPerVraagId) // { // scores.finaleAantalVragenBeantwoord++; // // if (alleJuisteAntwoorden.ContainsKey(antwoordenPerVraagId.Key) // && alleJuisteAntwoorden[antwoordenPerVraagId.Key].SafeEqual(antwoordenPerVraagId.Value)) // { // scores.finaleAantalVragenJuistBeantwoord++; // } // } var x = Math.Min(scores.aantalVragenJuistBeantwoord + scores.aantalPasVragenVerdiend, scores.aantalVragenBeantwoord); scores.percentage = (scores.aantalVragenBeantwoord > 0) ? x / scores.aantalVragenBeantwoord : 0m; //scores.finalePercentage = (scores.finaleAantalVragenBeantwoord > 0) ? scores.finaleAantalVragenJuistBeantwoord / scores.finaleAantalVragenBeantwoord : 0m; scores.totaalPercentage = scores.percentage; alleScores.Add(scores); } Util.SafeFileWithBackup(new ScoresData { MaxTeVerdienen = maxTeVerdienen, GroepsPot = groepspot, Scores = alleScores.OrderByDescending(s => s.totaalPercentage).ThenBy(s => s.totaleTijd).ToList() }); } }