Init default Material
This commit is contained in:
parent
b52303fd21
commit
13d82faca1
@ -2,8 +2,14 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:StudentManager"
|
xmlns:local="clr-namespace:StudentManager"
|
||||||
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
xmlns:prism="http://prismlibrary.com/">
|
xmlns:prism="http://prismlibrary.com/">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<md:BundledTheme BaseTheme="Dark" PrimaryColor="Grey" SecondaryColor="LightBlue" />
|
||||||
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</prism:PrismApplication>
|
</prism:PrismApplication>
|
||||||
|
@ -19,14 +19,17 @@ namespace StudentManager.Common
|
|||||||
|
|
||||||
public class DetailHomeWorkInfo
|
public class DetailHomeWorkInfo
|
||||||
{
|
{
|
||||||
public DetailQuestionBase QuestionData { get; set; } = new DetailQuestionBase();
|
//public DetailQuestionBase QuestionData { get; set; } = new DetailQuestionBase();
|
||||||
public DateTime DateTime { get; set; } = DateTime.Now;
|
public QuestionData QuestionData { get; set; } = new QuestionData();
|
||||||
public int Lesson { get; set; } = 0;
|
//public DateTime DateTime { get; set; } = DateTime.Now;
|
||||||
|
//public int Lesson { get; set; } = 0;
|
||||||
public bool Status { get; set; } = false;
|
public bool Status { get; set; } = false;
|
||||||
|
|
||||||
public int TotalCount { get; set; } = 0;
|
//public int TotalCount { get; set; } = 0;
|
||||||
public int ErrorCount { get; set; } = 0;
|
//public int ErrorCount { get; set; } = 0;
|
||||||
public int CorrectCount { get; set; } = 0;
|
//public int CorrectCount { get; set; } = 0;
|
||||||
|
|
||||||
|
public int PID { get; set; } = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class HomeWork
|
public class HomeWork
|
||||||
@ -48,15 +51,17 @@ namespace StudentManager.Common
|
|||||||
{
|
{
|
||||||
list.Add(new DetailHomeWorkInfo
|
list.Add(new DetailHomeWorkInfo
|
||||||
{
|
{
|
||||||
QuestionData = {
|
//QuestionData = {
|
||||||
|
// QuestionData = QuestionLib.Get(item.ID),
|
||||||
|
// Status = item.Status },
|
||||||
QuestionData = QuestionLib.Get(item.ID),
|
QuestionData = QuestionLib.Get(item.ID),
|
||||||
Status = item.Status },
|
|
||||||
Status = Status,
|
Status = Status,
|
||||||
Lesson = Lesson,
|
//Lesson = Lesson,
|
||||||
DateTime = DateTime,
|
//DateTime = DateTime,
|
||||||
TotalCount = TotalCount,
|
//TotalCount = TotalCount,
|
||||||
ErrorCount = ErrorCount,
|
//ErrorCount = ErrorCount,
|
||||||
CorrectCount = CorrectCount
|
//CorrectCount = CorrectCount,
|
||||||
|
PID = item.ID
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -140,15 +145,17 @@ namespace StudentManager.Common
|
|||||||
{
|
{
|
||||||
list.Add(new DetailHomeWorkInfo
|
list.Add(new DetailHomeWorkInfo
|
||||||
{
|
{
|
||||||
QuestionData = {
|
//QuestionData = {
|
||||||
|
// QuestionData = QuestionLib.Get(item.ID),
|
||||||
|
// Status = item.Status },
|
||||||
QuestionData = QuestionLib.Get(item.ID),
|
QuestionData = QuestionLib.Get(item.ID),
|
||||||
Status = item.Status },
|
Status = item.Status,
|
||||||
Status = HomeWorks[lesson].Status,
|
//Lesson = HomeWorks[lesson].Lesson,
|
||||||
Lesson = HomeWorks[lesson].Lesson,
|
//DateTime = HomeWorks[lesson].DateTime,
|
||||||
DateTime = HomeWorks[lesson].DateTime,
|
//TotalCount = HomeWorks[lesson].TotalCount,
|
||||||
TotalCount = HomeWorks[lesson].TotalCount,
|
//ErrorCount = HomeWorks[lesson].ErrorCount,
|
||||||
ErrorCount = HomeWorks[lesson].ErrorCount,
|
//CorrectCount = HomeWorks[lesson].CorrectCount,
|
||||||
CorrectCount = HomeWorks[lesson].CorrectCount
|
PID = item.ID
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,17 +7,23 @@
|
|||||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style x:Key="TextStyle" TargetType="TextBlock">
|
||||||
|
<Setter Property="Width" Value="200"/>
|
||||||
|
</Style>
|
||||||
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="100"/>
|
<ColumnDefinition Width="100"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ListBox ItemsSource="{Binding StudentDatas}"
|
<ListBox ItemsSource="{Binding StudentDatas}" ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||||
SelectedItem="{Binding SelectedStudent}">
|
SelectedItem="{Binding SelectedStudent}">
|
||||||
<i:Interaction.Triggers>
|
<i:Interaction.Triggers>
|
||||||
<i:EventTrigger EventName="SelectionChanged">
|
<i:EventTrigger EventName="SelectionChanged">
|
||||||
<i:InvokeCommandAction
|
<i:InvokeCommandAction
|
||||||
|
CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
|
||||||
Command="{Binding DataContext.SelectedCommand ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/>
|
Command="{Binding DataContext.SelectedCommand ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/>
|
||||||
</i:EventTrigger>
|
</i:EventTrigger>
|
||||||
</i:Interaction.Triggers>
|
</i:Interaction.Triggers>
|
||||||
@ -29,10 +35,7 @@
|
|||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<Grid Grid.Column="1">
|
<Grid Grid.Column="1">
|
||||||
<StackPanel>
|
<ListView ItemsSource="{Binding HomeWorkSet}">
|
||||||
<TextBlock Text="{Binding SelectedStudent.Name}"/>
|
|
||||||
<ListBox ItemsSource="{Binding CQDatas}"
|
|
||||||
SelectionChanged="ListBox_SelectionChanged">
|
|
||||||
|
|
||||||
<i:Interaction.Triggers>
|
<i:Interaction.Triggers>
|
||||||
<i:EventTrigger EventName="MouseDoubleClick">
|
<i:EventTrigger EventName="MouseDoubleClick">
|
||||||
@ -40,20 +43,34 @@
|
|||||||
CommandParameter="DetailCheckView"
|
CommandParameter="DetailCheckView"
|
||||||
Command="{Binding DataContext.RegionTo ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/>
|
Command="{Binding DataContext.RegionTo ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/>
|
||||||
</i:EventTrigger>
|
</i:EventTrigger>
|
||||||
|
<i:EventTrigger EventName="SelectionChanged">
|
||||||
|
<i:InvokeCommandAction
|
||||||
|
CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
|
||||||
|
Command="{Binding DataContext.HomeWorkSetSelectedCommand ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/>
|
||||||
|
</i:EventTrigger>
|
||||||
</i:Interaction.Triggers>
|
</i:Interaction.Triggers>
|
||||||
|
|
||||||
<ListBox.ItemTemplate>
|
<ListView.View>
|
||||||
<DataTemplate>
|
<GridView>
|
||||||
<StackPanel Orientation="Horizontal">
|
<GridViewColumn
|
||||||
<TextBlock Text="{Binding TotalCount}"/>
|
DisplayMemberBinding="{Binding DateTime}"
|
||||||
<TextBlock Text="{Binding CorrectCount}"/>
|
Header="创建时间" />
|
||||||
<TextBlock Text="{Binding Lesson}"/>
|
<GridViewColumn
|
||||||
</StackPanel>
|
DisplayMemberBinding="{Binding Lesson}"
|
||||||
</DataTemplate>
|
Header="第几课" />
|
||||||
</ListBox.ItemTemplate>
|
<GridViewColumn
|
||||||
</ListBox>
|
DisplayMemberBinding="{Binding TotalCount}"
|
||||||
|
Header="总题数" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding ErrorCount}"
|
||||||
|
Header="总错误题数" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding CorrectCount}"
|
||||||
|
Header="总正确题数" />
|
||||||
|
</GridView>
|
||||||
|
</ListView.View>
|
||||||
|
</ListView>
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -7,15 +7,21 @@
|
|||||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="Margin" Value="10,5"/>
|
||||||
|
</Style>
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<DockPanel HorizontalAlignment="Stretch">
|
||||||
|
<ListBox ItemsSource="{Binding HomeWorkSet}">
|
||||||
<ListBox ItemsSource="{Binding SelectedHomeWorkSet}">
|
|
||||||
<i:Interaction.Triggers>
|
<i:Interaction.Triggers>
|
||||||
<i:EventTrigger EventName="SelectionChanged">
|
<i:EventTrigger EventName="SelectionChanged">
|
||||||
<i:InvokeCommandAction
|
<i:InvokeCommandAction
|
||||||
Command="{Binding DataContext.HomeWorkSelectedCommand ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/>
|
CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
|
||||||
|
Command="{Binding DataContext.HomeWorkSetSelectedCommand ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/>
|
||||||
</i:EventTrigger>
|
</i:EventTrigger>
|
||||||
</i:Interaction.Triggers>
|
</i:Interaction.Triggers>
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
@ -25,20 +31,47 @@
|
|||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<ListBox DockPanel.Dock="Top" ItemsSource="{Binding HomeWork}">
|
<DockPanel LastChildFill="False" HorizontalAlignment="Stretch">
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
<!--<StackPanel dock Orientation="Horizontal">
|
||||||
<DockPanel Width="800" HorizontalAlignment="Stretch" LastChildFill="False">
|
<TextBlock Text=" 创建时间"/>
|
||||||
<TextBlock Text="{Binding DateTime}"/>
|
<TextBlock Text=" 第几课"/>
|
||||||
<TextBlock Text="{Binding QuestionData.QuestionData.Stem}"/>
|
<TextBlock Text=" 总题数"/>
|
||||||
<TextBlock Text="{Binding QuestionData.Stem}" TextWrapping="Wrap"/>
|
<TextBlock Text=" 总错误题数"/>
|
||||||
<CheckBox DockPanel.Dock="Right" Content="正确?"/>
|
<TextBlock Text=" 总正确题数"/>
|
||||||
</DockPanel>
|
<TextBlock Text=" 错误率"/>
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>
|
|
||||||
</ListBox>
|
|
||||||
<Button DockPanel.Dock="Bottom" Content="提交"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding SelectedHomeWorkSet.DateTime}"/>
|
||||||
|
<TextBlock Text="{Binding SelectedHomeWorkSet.Lesson}"/>
|
||||||
|
<TextBlock Text="{Binding SelectedHomeWorkSet.TotalCount}"/>
|
||||||
|
<TextBlock Text="{Binding SelectedHomeWorkSet.ErrorCount}"/>
|
||||||
|
<TextBlock Text="{Binding SelectedHomeWorkSet.CorrectCount}"/>
|
||||||
|
</StackPanel>-->
|
||||||
|
|
||||||
|
<ListView DockPanel.Dock="Top" ItemsSource="{Binding HomeWork}">
|
||||||
|
<ListView.View>
|
||||||
|
<GridView>
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding QuestionData.Id}"
|
||||||
|
Header="ID" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding QuestionData.Stem}"
|
||||||
|
Header="题干" />
|
||||||
|
<GridViewColumn Header="正确?">
|
||||||
|
<GridViewColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<CheckBox IsChecked="{Binding Status}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</GridViewColumn.CellTemplate>
|
||||||
|
</GridViewColumn>
|
||||||
|
</GridView>
|
||||||
|
</ListView.View>
|
||||||
|
</ListView>
|
||||||
|
|
||||||
|
<Button DockPanel.Dock="Bottom" Content="提交" Command="{Binding SubmitHomeWorkCommand}"/>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<Style x:Key="TextStyle" TargetType="{x:Type TextBlock}">
|
<Style x:Key="TextStyle" TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="Margin" Value="10,5"/>
|
<Setter Property="Margin" Value="10,5"/>
|
||||||
<Setter Property="Width" Value="50"/>
|
<Setter Property="Width" Value="50"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
</Style>
|
</Style>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
@ -22,7 +23,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
<ListBox ItemsSource="{Binding StudentDatas}"
|
<ListBox ItemsSource="{Binding StudentDatas}" ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||||
SelectedItem="{Binding SelectedStudent}">
|
SelectedItem="{Binding SelectedStudent}">
|
||||||
<i:Interaction.Triggers>
|
<i:Interaction.Triggers>
|
||||||
<i:EventTrigger EventName="SelectionChanged">
|
<i:EventTrigger EventName="SelectionChanged">
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
xmlns:prism="http://prismlibrary.com/"
|
xmlns:prism="http://prismlibrary.com/"
|
||||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
xmlns:extent="clr-namespace:StudentManager.Extensions"
|
xmlns:extent="clr-namespace:StudentManager.Extensions"
|
||||||
|
Background="#FF333333"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="MainEditor" Height="450" Width="800">
|
Title="MainEditor" Height="450" Width="800">
|
||||||
|
|
||||||
@ -15,13 +16,14 @@
|
|||||||
<ColumnDefinition Width="100"/>
|
<ColumnDefinition Width="100"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ItemsControl ItemsSource="{Binding MenuBars}">
|
<ItemsControl ItemsSource="{Binding MenuBars}">
|
||||||
|
|
||||||
|
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Button Content="{Binding Title}" Command="{Binding DataContext.RegionTo, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
<Button Content="{Binding Title}" Command="{Binding DataContext.RegionTo, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
||||||
CommandParameter="{Binding NameSpace}"/>
|
CommandParameter="{Binding NameSpace}" Margin="5.0"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<ListBox ItemsSource="{Binding QuestionDatas}">
|
<!--<ListBox ItemsSource="{Binding QuestionDatas}">
|
||||||
<!--<i:Interaction.Triggers>
|
--><!--<i:Interaction.Triggers>
|
||||||
<i:EventTrigger EventName="SelectionChanged">
|
<i:EventTrigger EventName="SelectionChanged">
|
||||||
<i:InvokeCommandAction x:Name="menuTrigger" Command="{Binding navigateCommand}" CommandParameter="{Binding ElementName=menu, Path=SelectedItem}"/>
|
<i:InvokeCommandAction x:Name="menuTrigger" Command="{Binding navigateCommand}" CommandParameter="{Binding ElementName=menu, Path=SelectedItem}"/>
|
||||||
</i:EventTrigger>
|
</i:EventTrigger>
|
||||||
</i:Interaction.Triggers>-->
|
</i:Interaction.Triggers>--><!--
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
@ -33,6 +33,38 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>-->
|
||||||
|
|
||||||
|
<ListView ItemsSource="{Binding QuestionDatas}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Disabled">
|
||||||
|
<ListView.View>
|
||||||
|
<GridView>
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding Id}"
|
||||||
|
Header="ID" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding Type}"
|
||||||
|
Header="类型" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding Stem}"
|
||||||
|
Header="题干" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding Answer}"
|
||||||
|
Header="答案" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding DifficultyLevel}"
|
||||||
|
Header="难度" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding Category}"
|
||||||
|
Header="标签" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding Source}"
|
||||||
|
Header="来源" />
|
||||||
|
<GridViewColumn
|
||||||
|
DisplayMemberBinding="{Binding Status}"
|
||||||
|
Header="状态" />
|
||||||
|
</GridView>
|
||||||
|
</ListView.View>
|
||||||
|
</ListView>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<Style x:Key="TextStyle" TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="Margin" Value="10,5"/>
|
<Setter Property="Margin" Value="10,5"/>
|
||||||
<Setter Property="Width" Value="50"/>
|
<Setter Property="Width" Value="50"/>
|
||||||
</Style>
|
</Style>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<ListBox ItemsSource="{Binding StudentDatas}"
|
|
||||||
SelectedItem="{Binding SelectedStudent}">
|
|
||||||
|
|
||||||
|
<ListView ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||||
|
ItemsSource="{Binding StudentDatas}" SelectedItem="{Binding SelectedStudent}">
|
||||||
<i:Interaction.Triggers>
|
<i:Interaction.Triggers>
|
||||||
<i:EventTrigger EventName="MouseDoubleClick">
|
<i:EventTrigger EventName="MouseDoubleClick">
|
||||||
<i:InvokeCommandAction
|
<i:InvokeCommandAction
|
||||||
@ -24,18 +24,21 @@
|
|||||||
Command="{Binding DataContext.RegionTo ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/>
|
Command="{Binding DataContext.RegionTo ,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"/>
|
||||||
</i:EventTrigger>
|
</i:EventTrigger>
|
||||||
</i:Interaction.Triggers>
|
</i:Interaction.Triggers>
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
<ListView.View>
|
||||||
<StackPanel Orientation="Horizontal">
|
<GridView>
|
||||||
<TextBlock Style="{StaticResource TextStyle}" Text="{Binding Name}"/>
|
<GridViewColumn
|
||||||
<!--<TextBlock Style="{StaticResource TextStyle}" Text="{Binding TotalsQuestions}"/>
|
DisplayMemberBinding="{Binding Name}"
|
||||||
<TextBlock Style="{StaticResource TextStyle}" Text="{Binding CorrectionCount}"/>
|
Header="姓名" />
|
||||||
<TextBlock Style="{StaticResource TextStyle}" Text="{Binding UnCorrectCount}"/>
|
<GridViewColumn
|
||||||
<TextBlock Style="{StaticResource TextStyle}" Text="{Binding ErrorRate}"/>
|
DisplayMemberBinding="{Binding ErrorSet.TotalCount}"
|
||||||
<TextBlock Style="{StaticResource TextStyle}" Text="{Binding CorrectRate}"/>-->
|
Header="错误总数" />
|
||||||
</StackPanel>
|
<GridViewColumn
|
||||||
</DataTemplate>
|
DisplayMemberBinding="{Binding ErrorSet.CorrectCount}"
|
||||||
</ListBox.ItemTemplate>
|
Header="修正数量" />
|
||||||
</ListBox>
|
</GridView>
|
||||||
|
</ListView.View>
|
||||||
|
</ListView>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -127,6 +127,7 @@ namespace StudentManager.Model
|
|||||||
public DelegateCommand<DetailHomeWorkInfo> HomeWorkSelectedCommand { get; set; }
|
public DelegateCommand<DetailHomeWorkInfo> HomeWorkSelectedCommand { get; set; }
|
||||||
public DelegateCommand<DetailHomeWorkSetInfo> HomeWorkSetSelectedCommand { get; set; }
|
public DelegateCommand<DetailHomeWorkSetInfo> HomeWorkSetSelectedCommand { get; set; }
|
||||||
public DelegateCommand RegionToDetailCommand { get; set; }
|
public DelegateCommand RegionToDetailCommand { get; set; }
|
||||||
|
public DelegateCommand SubmitHomeWorkCommand { get; set; }
|
||||||
|
|
||||||
Students(IRegionManager regionManager)
|
Students(IRegionManager regionManager)
|
||||||
{
|
{
|
||||||
@ -145,6 +146,8 @@ namespace StudentManager.Model
|
|||||||
RegionToStudents();
|
RegionToStudents();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
SubmitHomeWorkCommand = new DelegateCommand(() => SubmitHomeWork());
|
||||||
|
|
||||||
SelectedCommand = new DelegateCommand<StudentInfo>((x) =>
|
SelectedCommand = new DelegateCommand<StudentInfo>((x) =>
|
||||||
{
|
{
|
||||||
if (x == null) return;
|
if (x == null) return;
|
||||||
@ -184,6 +187,14 @@ namespace StudentManager.Model
|
|||||||
SaveAll();
|
SaveAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SubmitHomeWork()
|
||||||
|
{
|
||||||
|
SelectedStudent.HomeWorkSet.Get(SelectedHomeWorkSet.Lesson).Questions.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.Status = HomeWork.FirstOrDefault(hw => hw.PID == x.ID).Status;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void RegionToDetailView()
|
private void RegionToDetailView()
|
||||||
{
|
{
|
||||||
if(selectedStudent == null) return;
|
if(selectedStudent == null) return;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="MaterialDesignThemes" Version="5.1.0" />
|
||||||
<PackageReference Include="MySql.Data" Version="9.0.0" />
|
<PackageReference Include="MySql.Data" Version="9.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="Prism.DryIoc" Version="9.0.537" />
|
<PackageReference Include="Prism.DryIoc" Version="9.0.537" />
|
||||||
|
Loading…
Reference in New Issue
Block a user