public void SetNextExpectedKey(Paragraph paragraph, WordExercise wordExercise, Brush brush) { wordExercise.InputString += wordExercise.ExerciseString[0]; wordExercise.ExerciseString = wordExercise.ExerciseString.Substring(1, wordExercise.ExerciseString.Count() - 1); paragraph.Inlines.Clear(); paragraph.Inlines.Add(new Run(wordExercise.InputString) { Foreground = brush }); paragraph.Inlines.Add(new Run(wordExercise.ExerciseString)); }
public MultiplayerController(Multiplayer multiplayer) { var wordExercise = new WordExercise(databaseController.RetrieveRandomDbWords()); WordExercisePlayer1 = wordExercise; WordExercisePlayer2 = wordExercise; Multiplayer = multiplayer; Multiplayer.Player1.ExerciseTextBoxPlayer.Inlines.Add(new Run(WordExercisePlayer1.ExerciseString)); Multiplayer.Player2.ExerciseTextBoxPlayer.Inlines.Add(new Run(WordExercisePlayer2.ExerciseString)); Multiplayer.Player1.ScoreSlider.Maximum = WordExercisePlayer1.ExerciseString.Length; Multiplayer.Player2.ScoreSlider.Maximum = WordExercisePlayer2.ExerciseString.Length; Multiplayer.Player2.SwapSlider(); }