diff --git a/LangLang/View/ExamSlotGUI/EnterResults.xaml b/LangLang/View/ExamSlotGUI/EnterResults.xaml
new file mode 100644
index 00000000..070f67ad
--- /dev/null
+++ b/LangLang/View/ExamSlotGUI/EnterResults.xaml
@@ -0,0 +1,282 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/LangLang/View/ExamSlotGUI/EnterResults.xaml.cs b/LangLang/View/ExamSlotGUI/EnterResults.xaml.cs
new file mode 100644
index 00000000..f6e6adf7
--- /dev/null
+++ b/LangLang/View/ExamSlotGUI/EnterResults.xaml.cs
@@ -0,0 +1,51 @@
+using System.Windows;
+using System.Windows.Controls;
+
+
+namespace LangLang.View.ExamSlotGUI
+{
+ ///
+ /// Interaction logic for EnterResults.xaml
+ ///
+ public partial class EnterResults : Window
+ {
+ public EnterResults()
+ {
+ InitializeComponent();
+
+ disableForm();
+ }
+
+ private void disableForm()
+ {
+ nameTB.IsEnabled = false;
+ lastnameTB.IsEnabled = false;
+ emailTB.IsEnabled = false;
+ readingPointsTB.IsEnabled = false;
+ listeningPointsTB.IsEnabled = false;
+ writingPointsTB.IsEnabled = false;
+ speakingPointsTB.IsEnabled = false;
+ confirmResultBtn.IsEnabled = false;
+ }
+
+ private void enableForm()
+ {
+ readingPointsTB.IsEnabled = true;
+ listeningPointsTB.IsEnabled = true;
+ writingPointsTB.IsEnabled = true;
+ speakingPointsTB.IsEnabled = true;
+ confirmResultBtn.IsEnabled = true;
+ }
+
+ private void studentsDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ // TODO: implement
+ }
+
+ private void fillForm()
+ {
+
+ }
+
+ }
+}
diff --git a/LangLang/View/TutorWindow.xaml.cs b/LangLang/View/TutorWindow.xaml.cs
index c330944b..6a95a5ff 100644
--- a/LangLang/View/TutorWindow.xaml.cs
+++ b/LangLang/View/TutorWindow.xaml.cs
@@ -8,7 +8,6 @@
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
-using System.Diagnostics;
namespace LangLang
{
@@ -17,12 +16,12 @@ namespace LangLang
///
public partial class TutorWindow : Window, IObserver
{
- //for exam slots
+ // EXAM SLOTS
public ObservableCollection ExamSlots { get; set; }
public ExamSlotDTO SelectedExamSlot { get; set; }
private ExamSlotController examSlotsController { get; set; }
- //for courses
+ // COURSES
public ObservableCollection Courses { get; set; }
public CourseDTO SelectedCourse { get; set; }
private CourseController coursesController { get; set; }
@@ -43,8 +42,8 @@ public TutorWindow(AppController appController, Profile currentlyLoggedIn)
ExamSlots = new ObservableCollection();
Courses = new ObservableCollection();
- disableButtonsES();
- disableButtonsCourse();
+ DisableButtonsES();
+ DisableButtonsCourse();
coursesController.Subscribe(this);
examSlotsController.Subscribe(this);
@@ -132,40 +131,24 @@ private void CourseDeleteBtn_Click(object sender, RoutedEventArgs e)
MessageBox.Show("Selected course cannot be deleted, it has already started or there are less than 7 days before course start.");
}
}
-
+
private void CoursesTable_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- if (SelectedCourse == null)
- {
- disableButtonsCourse();
- }
- else
- {
- enableButtonsCourse();
- }
- }
-
- private void disableButtonsCourse()
- {
- courseUpdateBtn.IsEnabled = false;
- courseDeleteBtn.IsEnabled = false;
- }
- private void enableButtonsCourse()
{
if (SelectedCourse == null) {
- disableButtonsCourse();
+ DisableButtonsCourse();
} else
{
- enableButtonsCourse();
+ EnableButtonsCourse();
}
}
- private void disableButtonsCourse()
+ private void DisableButtonsCourse()
{
courseUpdateBtn.IsEnabled = false;
courseDeleteBtn.IsEnabled = false;
}
- private void enableButtonsCourse()
+
+ private void EnableButtonsCourse()
{
courseUpdateBtn.IsEnabled = true;
courseDeleteBtn.IsEnabled = true;
@@ -177,7 +160,7 @@ private void ExamSlotSearchBtn_Click(object sender, RoutedEventArgs e)
examSlotSearchWindow.Show();
}
- private void disableButtonsES()
+ private void DisableButtonsES()
{
deleteExamBtn.IsEnabled = false;
updateExamBtn.IsEnabled = false;
@@ -185,7 +168,7 @@ private void disableButtonsES()
enterResultsBtn.IsEnabled = false;
}
- private void enableButtonsES()
+ private void EnableButtonsES()
{
deleteExamBtn.IsEnabled = true;
updateExamBtn.IsEnabled = true;
@@ -201,16 +184,17 @@ private void ButtonSeeStudentInfo_Click(object sender, RoutedEventArgs e)
private void ButtonEnterResults_Click(object sender, RoutedEventArgs e)
{
- // TODO: implement
+ EnterResults resultsWindow = new EnterResults();
+ resultsWindow.Show();
}
private void ExamSlotsDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (SelectedExamSlot == null) // when the DataGrid listener is triggered, check if there is a selection, and based on that, decide whether to enable or disable the buttons
{
- disableButtonsES();
+ DisableButtonsES();
} else {
- enableButtonsES();
+ EnableButtonsES();
}
}