HotkeysView.axaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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="1200" d:DesignHeight="800"
  6. x:Class="HelloItQuantum.Views.HotkeysView"
  7. x:DataType="vm:MainWindowViewModel"
  8. xmlns:vm="using:HelloItQuantum.ViewModels"
  9. Background="#CCD7EB" >
  10. <UserControl.Styles>
  11. <Style Selector="TextBlock">
  12. <Setter Property="FontFamily" Value="{StaticResource BankGothicMediumRUS}" />
  13. </Style>
  14. <Style Selector="Button">
  15. <Setter Property="FontFamily" Value="{StaticResource BankGothicMediumRUS}" />
  16. </Style>
  17. <Style Selector="TextBox">
  18. <Setter Property="FontFamily" Value="{StaticResource BankGothicMediumRUS}" />
  19. </Style>
  20. <Style Selector="Button:pointerover/template/ContentPresenter">
  21. <Setter Property="Background" Value="#0036A0" />
  22. </Style>
  23. <Style Selector="TextBox:pointerover/template/Border">
  24. <Setter Property="Background" Value="#F26527" />
  25. <Setter Property="BorderBrush" Value="Transparent" />
  26. <Setter Property="CornerRadius" Value="20" />
  27. </Style>
  28. <Style Selector="TextBox:focus/template/Border">
  29. <Setter Property="Background" Value="#F26527" />
  30. <Setter Property="BorderBrush" Value="Transparent" />
  31. <Setter Property="CornerRadius" Value="20" />
  32. </Style>
  33. </UserControl.Styles>
  34. <StackPanel HorizontalAlignment="Stretch" Orientation="Vertical" VerticalAlignment="Stretch">
  35. <Panel>
  36. <Grid ColumnDefinitions="0.7*,*" RowDefinitions="*" Width="{Binding $parent[StackPanel].Bounds.Width}">
  37. <Panel Grid.Column="0" Grid.Row="0" Height="{Binding $parent[StackPanel].Bounds.Height}">
  38. <StackPanel VerticalAlignment="Center" IsVisible="{Binding HotkeysVM.VisibleSvgHotkey}">
  39. <Svg Path="/Assets/ImgHotkeys/Робот.svg" Margin="0 0" VerticalAlignment="Center"/>
  40. </StackPanel>
  41. <Grid RowDefinitions="5*, 2*" VerticalAlignment="Center" IsVisible="{Binding !HotkeysVM.VisibleSvgHotkey}" Margin="0 20">
  42. <Svg Grid.Row="0" Path="/Assets/ImgHotkeys/Робот.svg" VerticalAlignment="Center"/>
  43. <Svg Grid.Row="1" Path="{Binding HotkeysVM.PathSvgHotkey}" Margin="100 0"/>
  44. </Grid>
  45. </Panel>
  46. <StackPanel Grid.Column="1" Grid.Row="0" Margin="0 30 50 25" VerticalAlignment="Stretch">
  47. <StackPanel.Background>
  48. <ImageBrush Source="/Assets/ImgHotkeys/Диалоговое_окно.png" Stretch="Fill"/>
  49. </StackPanel.Background>
  50. <Grid ColumnDefinitions="0.1*,0.2*,0.05*,*,0.1*" RowDefinitions="45,*,30" VerticalAlignment="Stretch" >
  51. <StackPanel Grid.Column="1" Grid.Row="1" >
  52. <Button Command="{Binding HotkeysVM.PlayTask}" VerticalAlignment="Top" CornerRadius="10000" Padding="1">
  53. <Image Source="/Assets/ImgHotkeys/КнопкаPlay.png"/>
  54. </Button>
  55. <TextBlock Text="{Binding HotkeysVM.TextShowAct}" TextAlignment="Center" FontSize="24" Foreground="#0534B5"/>
  56. </StackPanel>
  57. <StackPanel Grid.Column="3" Grid.Row="1" Background="">
  58. <ScrollViewer VerticalAlignment="Stretch">
  59. <!--Текст-->
  60. <TextBlock VerticalAlignment="Stretch" FontSize="40"
  61. TextWrapping="Wrap" Foreground="#0534B5" HorizontalAlignment="Stretch"
  62. Text="{Binding HotkeysVM.TextInSP}">
  63. </TextBlock>
  64. </ScrollViewer>
  65. <!--Поле ввода ответа-->
  66. <StackPanel IsVisible="{Binding HotkeysVM.VisibleTBAnswer}">
  67. <Border CornerRadius="20" Background="#F26527" BoxShadow="0 5 #973F19" HorizontalAlignment="Stretch" Margin="0 20 0 0"
  68. >
  69. <TextBox Background="Transparent" BorderBrush="Transparent" CornerRadius="20" Text="{Binding HotkeysVM.TextAnswer}"
  70. FontSize="40" Foreground="#FFFFFF" Padding="25 15" Watermark="Ответ:"/>
  71. </Border>
  72. <Button Content="Я забыл..." Background="Transparent" Foreground="#B21E22" FontSize="34"
  73. Command="{Binding HotkeysVM.GoNext}" CommandParameter="Забыл" >
  74. <Button.Styles>
  75. <Style Selector="Button:pointerover/template/ContentPresenter">
  76. <Setter Property="Background" Value="Transparent" />
  77. </Style>
  78. </Button.Styles>
  79. </Button>
  80. </StackPanel>
  81. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  82. <!--Кнопка Далее-->
  83. <Border CornerRadius="20" Background="#00A659" BoxShadow="0 5 #006838" Margin="0 20 0 20" HorizontalAlignment="Right"
  84. IsVisible="{Binding HotkeysVM.VisibleBtnNext}">
  85. <Button VerticalContentAlignment="Center"
  86. Command="{Binding HotkeysVM.GoNext}" CommandParameter="Далее" CornerRadius="20">
  87. <TextBlock Text="{Binding HotkeysVM.TextInBtnNext}" TextAlignment="Center" FontSize="40" Foreground="#FFFFFF" Margin="25 15"/>
  88. </Button>
  89. </Border>
  90. <!--Кнопка Нет-->
  91. <Border CornerRadius="20" Background="#B21E22" BoxShadow="0 5 #470C0D" Margin="30 20 0 20" HorizontalAlignment="Right"
  92. IsVisible="{Binding HotkeysVM.VisibleBtnNo}">
  93. <Button VerticalContentAlignment="Center"
  94. Command="{Binding HotkeysVM.GoNext}" CommandParameter="Нет" CornerRadius="20">
  95. <TextBlock Text="Нет" TextAlignment="Center" FontSize="40" Foreground="#FFFFFF" Margin="25 15"/>
  96. </Button>
  97. </Border>
  98. </StackPanel>
  99. </StackPanel>
  100. </Grid>
  101. </StackPanel>
  102. </Grid>
  103. <Button Command="{Binding HotkeysVM.GoBack}" Width="50" Height="50" VerticalAlignment="Top" CornerRadius="10000" Padding="1" Margin="20 20 0 0">
  104. <Image Source="/Assets/КнопкаНазад.png"/>
  105. </Button>
  106. </Panel>
  107. </StackPanel>
  108. </UserControl>