private void HideLettersOnCard(WordCard wordCard) { switch (Window.InputDevice) { case InputDevice.Mouse : { wordCard.LettersThatAreShown = LettersThatAreShown.FirstCharacter; break; } case InputDevice.Keyboard : { wordCard.LettersThatAreShown = LettersThatAreShown.Nothing; break; } default : { throw new ApplicationException("never reach here."); } } }
private void Shuffle() { var queue = new Queue<MondaiWord>(正位置を避けるシャッフル(Ankimon.GetMondaiWords())); foreach (var ankimonRowContainer in _ankimonBox.Items.Cast<AnkimonRowContainer>()) { var collection = ankimonRowContainer.WordCardContainer.Items; for (int i = 0; i < collection.Count(); i++) { collection[i] = new WordCard(queue.Dequeue()); } } }