diff --git a/comquiz/App.xaml b/comquiz/App.xaml
index 52e9c4e..9d23685 100644
--- a/comquiz/App.xaml
+++ b/comquiz/App.xaml
@@ -307,7 +307,11 @@
12
14
+ 15
18
+ 20
+ 30
+ 50
20
diff --git a/comquiz/Models/QuizSheet.cs b/comquiz/Models/QuizSheet.cs
index af7b72d..2da86c2 100644
--- a/comquiz/Models/QuizSheet.cs
+++ b/comquiz/Models/QuizSheet.cs
@@ -188,7 +188,7 @@ public static List SplitTheQuiz(List originalList,
// Sixth
equalPieces = 6;
- if (quizPart == QUIZPARTIAL.Fifth)
+ if (quizPart == QUIZPARTIAL.Sixth)
{
wantTheLastPiece = true;
}
diff --git a/comquiz/Properties/strings.it.resx b/comquiz/Properties/strings.it.resx
index da2318e..cb0e100 100644
--- a/comquiz/Properties/strings.it.resx
+++ b/comquiz/Properties/strings.it.resx
@@ -196,7 +196,7 @@
Errore durante la lettura del QUIZ
- Hai selezionato meno risposte di quanto dovresti. Mettici una pezza.
+ Hai selezionato meno risposte del dovuto. Selezionane altre dalla lista
QUIZ completato. Risultato
diff --git a/comquiz/ViewModels/ControlsViewModel.cs b/comquiz/ViewModels/ControlsViewModel.cs
new file mode 100644
index 0000000..41e50b9
--- /dev/null
+++ b/comquiz/ViewModels/ControlsViewModel.cs
@@ -0,0 +1,7 @@
+namespace comquiz.ViewModels
+{
+ class ControlsViewModel : ViewModelBase
+ {
+
+ }
+}
diff --git a/comquiz/ViewModels/MainMenuViewModel.cs b/comquiz/ViewModels/MainMenuViewModel.cs
index a7889fd..fbd2047 100644
--- a/comquiz/ViewModels/MainMenuViewModel.cs
+++ b/comquiz/ViewModels/MainMenuViewModel.cs
@@ -8,7 +8,7 @@ class MainMenuViewModel : ViewModelBase
{
readonly public MainWindowViewModel MainDatacontext;
- public string _version = "v200410";
+ public string _version = "v210110";
public string Version
{
get => _version;
diff --git a/comquiz/ViewModels/MainWindowViewModel.cs b/comquiz/ViewModels/MainWindowViewModel.cs
index 1003eb3..4286141 100644
--- a/comquiz/ViewModels/MainWindowViewModel.cs
+++ b/comquiz/ViewModels/MainWindowViewModel.cs
@@ -61,5 +61,10 @@ public void DisplayAboutScreen()
MainWindowContent = new AboutScreenViewModel();
}
+ public void DisplayControlsScreen()
+ {
+ MainWindowContent = new ControlsViewModel();
+ }
+
}
}
diff --git a/comquiz/ViewModels/QuizScreenViewModel.cs b/comquiz/ViewModels/QuizScreenViewModel.cs
index c2d806f..5b42dd8 100644
--- a/comquiz/ViewModels/QuizScreenViewModel.cs
+++ b/comquiz/ViewModels/QuizScreenViewModel.cs
@@ -22,7 +22,13 @@ public QuizSheet CurrentQuiz
public QuestionSheet CurrentQuestion
{
get => _currentQuestion;
- set => this.RaiseAndSetIfChanged(ref _currentQuestion, value);
+ set
+ {
+ this.RaiseAndSetIfChanged(ref _currentQuestion, value);
+
+ WarningForNotEnoughAnswer = false;
+
+ }
}
short _currentQuestionNumber;
@@ -53,9 +59,14 @@ public bool SpoilRightAnswer
set => this.RaiseAndSetIfChanged(ref _spoilRightAnswer, value);
}
+ bool _warningForNotEnoughAnswer = false;
+ public bool WarningForNotEnoughAnswer
+ {
+ get => _warningForNotEnoughAnswer;
+ set => this.RaiseAndSetIfChanged(ref _warningForNotEnoughAnswer, value);
+ }
-
-
+ bool QuizIsOver = false;
public QuizScreenViewModel(MainWindowViewModel parentDataContext)
{
@@ -97,7 +108,11 @@ public void ShowAnswers()
public void NextQuestion()
{
- MarkChoosedAnswers();
+
+ if (CurrentQuestion.NumberOfRightAnswers == SelectedAnswers?.Count)
+ {
+ MarkChoosedAnswers();
+ }
ANSWERED questionStatus = CurrentQuestion.GetQuestionStatus();
@@ -115,7 +130,9 @@ public void NextQuestion()
{
// QUIZ FINISHED!
- DisplayQuizResult();
+ if(!QuizIsOver) DisplayQuizResult();
+
+ QuizIsOver = true;
}
else
@@ -175,15 +192,9 @@ public void DisplayQuizResult()
AnsweringEnabled = false;
}
- public static void ShowNotEnoughAnswersAlert()
+ public void ShowNotEnoughAnswersAlert()
{
- var messageBoxStandardWindow = MessageBox.Avalonia.MessageBoxManager.GetMessageBoxStandardWindow(
- "( ⚆ _ ⚆ )",
- Properties.strings.quizScreen_notEnoughSelectedAnswers,
- MessageBox.Avalonia.Enums.ButtonEnum.Ok,
- MessageBox.Avalonia.Enums.Icon.Info);
-
- messageBoxStandardWindow.Show();
+ WarningForNotEnoughAnswer = true;
}
diff --git a/comquiz/Views/AboutScreenView.xaml b/comquiz/Views/AboutScreenView.xaml
index ddb7144..db596e5 100644
--- a/comquiz/Views/AboutScreenView.xaml
+++ b/comquiz/Views/AboutScreenView.xaml
@@ -10,7 +10,7 @@
@@ -37,11 +37,11 @@
-