diff --git a/TarotType.Main/MainWindow.xaml b/TarotType.Main/MainWindow.xaml index 992ac18..3135abd 100644 --- a/TarotType.Main/MainWindow.xaml +++ b/TarotType.Main/MainWindow.xaml @@ -26,6 +26,7 @@ Style="{StaticResource ChangeThemeToggleButtonTheme}"> + - - - - - - + diff --git a/TarotType.Main/MainWindow.xaml.cs b/TarotType.Main/MainWindow.xaml.cs index 93578c8..37165b1 100644 --- a/TarotType.Main/MainWindow.xaml.cs +++ b/TarotType.Main/MainWindow.xaml.cs @@ -67,6 +67,7 @@ private void tboxWrite_Loaded(object sender, RoutedEventArgs e) RefreshGame(); SetThemeAccordingtoStorage(); } + private void btnRefresh_Click(object sender, RoutedEventArgs e) { RefreshGame(); @@ -99,9 +100,7 @@ private void tboxWrite_TextChanged(object sender, TextChangedEventArgs e) { _isStartedBefore = true; _dispatcherTimer.Start(); - return; } - else if (tboxWrite.Text != string.Empty && !_isTextBoxChangedCanFire || tboxWrite.Text == " ") { tboxWrite.Text = String.Empty; @@ -142,9 +141,7 @@ private void tboxWrite_PreviewKeyDown(object sender, KeyEventArgs e) //when text if (_currentWord1Index == lastIndex - 1) { _currentWord1Index = 0; - GetAnotherStack(_words2); - return; } @@ -152,7 +149,6 @@ private void tboxWrite_PreviewKeyDown(object sender, KeyEventArgs e) //when text if (_currentTextOfTextBox == _targetText) TextDoneTrue(_words1[_currentWord1Index], _words1[_currentWord1Index + 1]); - else TextDoneWrong(_words1[_currentWord1Index], _words1[_currentWord1Index + 1]); } @@ -225,6 +221,7 @@ private void RefreshGame() _numberOfKeyStroke = 0; _numberOfTrueKeyStroke = 0; _numberOfFalseKeyStroke = 0; + _isTextBoxChangedCanFire = true; _isStartedBefore = false; @@ -248,11 +245,12 @@ private void RefreshStack(StackPanel panel, List