diff --git a/StudentManager/App.xaml b/StudentManager/App.xaml index 2a75079..c302656 100644 --- a/StudentManager/App.xaml +++ b/StudentManager/App.xaml @@ -2,8 +2,14 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:StudentManager" + xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:prism="http://prismlibrary.com/"> - + + + + + + diff --git a/StudentManager/Common/HomeWorkSet.cs b/StudentManager/Common/HomeWorkSet.cs index f6de5c9..0827111 100644 --- a/StudentManager/Common/HomeWorkSet.cs +++ b/StudentManager/Common/HomeWorkSet.cs @@ -19,14 +19,17 @@ namespace StudentManager.Common public class DetailHomeWorkInfo { - public DetailQuestionBase QuestionData { get; set; } = new DetailQuestionBase(); - public DateTime DateTime { get; set; } = DateTime.Now; - public int Lesson { get; set; } = 0; + //public DetailQuestionBase QuestionData { get; set; } = new DetailQuestionBase(); + public QuestionData QuestionData { get; set; } = new QuestionData(); + //public DateTime DateTime { get; set; } = DateTime.Now; + //public int Lesson { get; set; } = 0; public bool Status { get; set; } = false; - public int TotalCount { get; set; } = 0; - public int ErrorCount { get; set; } = 0; - public int CorrectCount { get; set; } = 0; + //public int TotalCount { get; set; } = 0; + //public int ErrorCount { get; set; } = 0; + //public int CorrectCount { get; set; } = 0; + + public int PID { get; set; } = 0; } public class HomeWork @@ -48,15 +51,17 @@ namespace StudentManager.Common { list.Add(new DetailHomeWorkInfo { - QuestionData = { - QuestionData = QuestionLib.Get(item.ID), - Status = item.Status }, + //QuestionData = { + // QuestionData = QuestionLib.Get(item.ID), + // Status = item.Status }, + QuestionData = QuestionLib.Get(item.ID), Status = Status, - Lesson = Lesson, - DateTime = DateTime, - TotalCount = TotalCount, - ErrorCount = ErrorCount, - CorrectCount = CorrectCount + //Lesson = Lesson, + //DateTime = DateTime, + //TotalCount = TotalCount, + //ErrorCount = ErrorCount, + //CorrectCount = CorrectCount, + PID = item.ID }); } @@ -140,15 +145,17 @@ namespace StudentManager.Common { list.Add(new DetailHomeWorkInfo { - QuestionData = { - QuestionData = QuestionLib.Get(item.ID), - Status = item.Status }, - Status = HomeWorks[lesson].Status, - Lesson = HomeWorks[lesson].Lesson, - DateTime = HomeWorks[lesson].DateTime, - TotalCount = HomeWorks[lesson].TotalCount, - ErrorCount = HomeWorks[lesson].ErrorCount, - CorrectCount = HomeWorks[lesson].CorrectCount + //QuestionData = { + // QuestionData = QuestionLib.Get(item.ID), + // Status = item.Status }, + QuestionData = QuestionLib.Get(item.ID), + Status = item.Status, + //Lesson = HomeWorks[lesson].Lesson, + //DateTime = HomeWorks[lesson].DateTime, + //TotalCount = HomeWorks[lesson].TotalCount, + //ErrorCount = HomeWorks[lesson].ErrorCount, + //CorrectCount = HomeWorks[lesson].CorrectCount, + PID = item.ID }); } diff --git a/StudentManager/Editor/CheckView.xaml b/StudentManager/Editor/CheckView.xaml index dee11da..7298a01 100644 --- a/StudentManager/Editor/CheckView.xaml +++ b/StudentManager/Editor/CheckView.xaml @@ -7,17 +7,23 @@ xmlns:i="http://schemas.microsoft.com/xaml/behaviors" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> + + + - @@ -29,31 +35,42 @@ - - - - - - - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/StudentManager/Editor/DetailCheckView.xaml b/StudentManager/Editor/DetailCheckView.xaml index 5ff9513..5ca98db 100644 --- a/StudentManager/Editor/DetailCheckView.xaml +++ b/StudentManager/Editor/DetailCheckView.xaml @@ -7,15 +7,21 @@ xmlns:i="http://schemas.microsoft.com/xaml/behaviors" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> + + + + - - - + + + CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" + Command="{Binding DataContext.HomeWorkSetSelectedCommand ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/> @@ -24,21 +30,48 @@ - - - - - - - - - - - - - -