TestSettings.axaml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  6. x:Class="EntranseTesting.TestSettings"
  7. x:DataType="vm:MainWindowViewModel"
  8. xmlns:vm="using:EntranseTesting.ViewModels">
  9. <ScrollViewer>
  10. <StackPanel Margin="15 10" Spacing="10">
  11. <TextBlock Text="{Binding Mess.WarningSettingsApp}"
  12. Classes="Small"
  13. TextWrapping="Wrap"/>
  14. <WrapPanel Orientation="Horizontal"
  15. HorizontalAlignment="Center" VerticalAlignment="Stretch">
  16. <Border Margin="10 2"
  17. HorizontalAlignment="Center">
  18. <StackPanel Spacing="5" Orientation="Vertical">
  19. <TextBlock Text="Настройки Теста"
  20. Classes="Header"
  21. HorizontalAlignment="Center"/>
  22. <WrapPanel Orientation="Horizontal">
  23. <TextBlock Text="Количество вопросов"
  24. VerticalAlignment="Center"
  25. Margin="5 0"/>
  26. <NumericUpDown Value="{Binding EditorPages.SettingsApp.Settings.CountOfQuestions, TargetNullValue=0}"
  27. Minimum="5" Maximum="{Binding EditorPages.SettingsApp.CountQuestion}"
  28. Margin="5 0"/>
  29. </WrapPanel>
  30. <WrapPanel Orientation="Horizontal">
  31. <TextBlock Text="Время прохождения"
  32. VerticalAlignment="Center"
  33. Margin="5 0"/>
  34. <TimePicker SelectedTime="{Binding EditorPages.SettingsApp.Settings.Time}"
  35. MinuteIncrement="5"
  36. Margin="5 0"/>
  37. </WrapPanel>
  38. <CheckBox Content="Показать результат теста"
  39. IsChecked="{Binding EditorPages.SettingsApp.Settings.ResultVisibiliry}"
  40. Margin="5 0"/>
  41. <CheckBox Name="HintVisibility"
  42. Content="Включить подсказки в тест"
  43. ToolTip.Tip="{Binding Mess.ToolTipHintCount}" ToolTip.Placement="Right"
  44. IsChecked="{Binding EditorPages.SettingsApp.Settings.HintVisibility}"
  45. Margin="5 0"/>
  46. <WrapPanel Orientation="Horizontal"
  47. IsVisible="{Binding #HintVisibility.IsChecked}">
  48. <TextBlock Text="Количество подсказок*"
  49. VerticalAlignment="Center"
  50. ToolTip.Tip="{Binding Mess.ToolTipHintCount}" ToolTip.Placement="Right"
  51. Margin="5 0"/>
  52. <NumericUpDown Name="nCountOfHints"
  53. Value="{Binding EditorPages.SettingsApp.Settings.CountOfHints, TargetNullValue=0}"
  54. Minimum="0" Maximum="1000"
  55. Margin="5 0"/>
  56. </WrapPanel>
  57. </StackPanel>
  58. </Border>
  59. <Border Margin="10 2"
  60. HorizontalAlignment="Center">
  61. <StackPanel Spacing="5" Orientation="Vertical">
  62. <TextBlock Text="Настройки Оценивания теста"
  63. Classes="Header"
  64. HorizontalAlignment="Center"/>
  65. <TextBlock Text="{Binding Mess.AboutEvaluationTest}"
  66. Classes="Small"
  67. TextWrapping="Wrap"/>
  68. <WrapPanel Orientation="Horizontal">
  69. <TextBlock Text="Оценка 5"
  70. VerticalAlignment="Center"
  71. Margin="5 0"/>
  72. <NumericUpDown Name="Raiting5"
  73. Value="{Binding EditorPages.SettingsApp.Settings.Raiting5, TargetNullValue=0}"
  74. Minimum="0" Maximum="{Binding EditorPages.SettingsApp.CountQuestion}"
  75. Margin="5 0"/>
  76. </WrapPanel>
  77. <WrapPanel Orientation="Horizontal">
  78. <TextBlock Text="Оценка 4"
  79. VerticalAlignment="Center"
  80. Margin="5 0"/>
  81. <NumericUpDown Name="Raiting4"
  82. Value="{Binding EditorPages.SettingsApp.Settings.Raiting4, TargetNullValue=0}"
  83. Minimum="0" Maximum="{Binding #Raiting5.Value}"
  84. Margin="5 0"/>
  85. </WrapPanel>
  86. <WrapPanel Orientation="Horizontal">
  87. <TextBlock Text="Оценка 3"
  88. VerticalAlignment="Center"
  89. Margin="5 0"/>
  90. <NumericUpDown Value="{Binding EditorPages.SettingsApp.Settings.Raiting3, TargetNullValue='0'}"
  91. Minimum="0" Maximum="{Binding #Raiting4.Value}" Margin="5 0"/>
  92. </WrapPanel>
  93. </StackPanel>
  94. </Border>
  95. </WrapPanel>
  96. <Button Content="Сохранить"
  97. Command="{Binding EditorPages.SaveSettingsCommand}"
  98. HorizontalAlignment="Center"/>
  99. </StackPanel>
  100. </ScrollViewer>
  101. </UserControl>