Begin_UserVerification.xaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <Window x:Class="Hammer_store.Begin_UserVerification"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Hammer_store"
  7. mc:Ignorable="d"
  8. Height="270" Width="400"
  9. ResizeMode="NoResize"
  10. WindowStartupLocation="CenterScreen"
  11. WindowStyle="None"
  12. AllowsTransparency="True"
  13. Background="Transparent"
  14. MouseLeftButtonDown="dragMe"
  15. Icon="Resources/Images/logo2.png"
  16. Title="Hammer store (Добро пожаловать)">
  17. <Window.Resources>
  18. <!--** Кастомная кнопка "Да" **-->
  19. <Style x:Key="FocusVisual">
  20. <Setter Property="Control.Template">
  21. <Setter.Value>
  22. <ControlTemplate>
  23. <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
  24. </ControlTemplate>
  25. </Setter.Value>
  26. </Setter>
  27. </Style>
  28. <SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
  29. <SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
  30. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="Transparent"/>
  31. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="White"/>
  32. <SolidColorBrush x:Key="Button.Pressed.Background" Color="Transparent"/>
  33. <SolidColorBrush x:Key="Button.Pressed.Border" Color="Transparent"/>
  34. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
  35. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
  36. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
  37. <Style x:Key="buttonYes" TargetType="{x:Type Button}">
  38. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
  39. <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
  40. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
  41. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  42. <Setter Property="BorderThickness" Value="1"/>
  43. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  44. <Setter Property="VerticalContentAlignment" Value="Center"/>
  45. <Setter Property="Padding" Value="1"/>
  46. <Setter Property="Template">
  47. <Setter.Value>
  48. <ControlTemplate TargetType="{x:Type Button}">
  49. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
  50. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  51. </Border>
  52. <ControlTemplate.Triggers>
  53. <Trigger Property="IsDefaulted" Value="true">
  54. <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  55. </Trigger>
  56. <Trigger Property="IsMouseOver" Value="true">
  57. <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
  58. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
  59. </Trigger>
  60. <Trigger Property="IsPressed" Value="true">
  61. <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
  62. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
  63. </Trigger>
  64. <Trigger Property="IsEnabled" Value="false">
  65. <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
  66. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
  67. <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
  68. </Trigger>
  69. </ControlTemplate.Triggers>
  70. </ControlTemplate>
  71. </Setter.Value>
  72. </Setter>
  73. </Style>
  74. <!--** Кастомная кнопка "Нет, я еще новенький" **-->
  75. <Style x:Key="FocusVisual1">
  76. <Setter Property="Control.Template">
  77. <Setter.Value>
  78. <ControlTemplate>
  79. <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
  80. </ControlTemplate>
  81. </Setter.Value>
  82. </Setter>
  83. </Style>
  84. <SolidColorBrush x:Key="Button.Static.Background1" Color="#FFDDDDDD"/>
  85. <SolidColorBrush x:Key="Button.Static.Border1" Color="#FF707070"/>
  86. <SolidColorBrush x:Key="Button.MouseOver.Background1" Color="Transparent"/>
  87. <SolidColorBrush x:Key="Button.MouseOver.Border1" Color="White"/>
  88. <SolidColorBrush x:Key="Button.Pressed.Background1" Color="Transparent"/>
  89. <SolidColorBrush x:Key="Button.Pressed.Border1" Color="Transparent"/>
  90. <SolidColorBrush x:Key="Button.Disabled.Background1" Color="#FFF4F4F4"/>
  91. <SolidColorBrush x:Key="Button.Disabled.Border1" Color="#FFADB2B5"/>
  92. <SolidColorBrush x:Key="Button.Disabled.Foreground1" Color="#FF838383"/>
  93. <Style x:Key="buttonNo" TargetType="{x:Type Button}">
  94. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual1}"/>
  95. <Setter Property="Background" Value="{StaticResource Button.Static.Background1}"/>
  96. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border1}"/>
  97. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  98. <Setter Property="BorderThickness" Value="1"/>
  99. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  100. <Setter Property="VerticalContentAlignment" Value="Center"/>
  101. <Setter Property="Padding" Value="1"/>
  102. <Setter Property="Template">
  103. <Setter.Value>
  104. <ControlTemplate TargetType="{x:Type Button}">
  105. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
  106. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  107. </Border>
  108. <ControlTemplate.Triggers>
  109. <Trigger Property="IsDefaulted" Value="true">
  110. <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  111. </Trigger>
  112. <Trigger Property="IsMouseOver" Value="true">
  113. <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background1}"/>
  114. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border1}"/>
  115. </Trigger>
  116. <Trigger Property="IsPressed" Value="true">
  117. <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background1}"/>
  118. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border1}"/>
  119. </Trigger>
  120. <Trigger Property="IsEnabled" Value="false">
  121. <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background1}"/>
  122. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border1}"/>
  123. <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground1}"/>
  124. </Trigger>
  125. </ControlTemplate.Triggers>
  126. </ControlTemplate>
  127. </Setter.Value>
  128. </Setter>
  129. </Style>
  130. </Window.Resources>
  131. <!--** Градиентовая рамка **-->
  132. <Border CornerRadius="5"
  133. BorderThickness="5">
  134. <Border.BorderBrush>
  135. <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
  136. <GradientStop Color="#FF661579" Offset="0.0"/>
  137. <GradientStop Color="#282c36" Offset="0.5"/>
  138. <GradientStop Color="#FF661579" Offset="1.0"/>
  139. </LinearGradientBrush>
  140. </Border.BorderBrush>
  141. <!--** Сетка **-->
  142. <Grid>
  143. <!--** Фоновый цвет для сетки **-->
  144. <Grid.Background>
  145. <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
  146. <GradientStop Color="#FF661579" Offset="0.0"/>
  147. <GradientStop Color="#282c36" Offset="0.5"/>
  148. <GradientStop Color="#FF661579" Offset="1.0"/>
  149. </LinearGradientBrush>
  150. </Grid.Background>
  151. <!--** Стек **-->
  152. <StackPanel>
  153. <!--* Заголовок на форме *-->
  154. <Label Content="Hammer store"
  155. HorizontalAlignment="Center"
  156. Foreground="White"
  157. FontFamily="Fregat"
  158. FontSize="30"
  159. Margin="0 10 0 0"
  160. Background="Black"
  161. BorderThickness="2"
  162. BorderBrush="#FFFBFAFA">
  163. <Label.Resources>
  164. <Style TargetType="Border">
  165. <Setter Property="CornerRadius" Value="5"/>
  166. </Style>
  167. </Label.Resources>
  168. <Label.Effect>
  169. <DropShadowEffect Direction="270" BlurRadius="10"/>
  170. </Label.Effect>
  171. </Label>
  172. <!--* Вопрос *-->
  173. <Label Content="ВЫ УЖЕ ЗАРЕГИСТРИРОВАНЫ?"
  174. HorizontalAlignment="Center"
  175. Margin="0, 10, 0, 0"
  176. FontSize="20"
  177. FontFamily="Fregat"
  178. Foreground="White"/>
  179. <!--* Кнопка "Да" *-->
  180. <Button Style="{DynamicResource buttonYes}"
  181. x:Name="button_YES"
  182. Content="Да"
  183. VerticalAlignment="Top"
  184. Height="70" Margin="60 10 60 10"
  185. FontFamily="Fregat"
  186. FontSize="30"
  187. Foreground="White"
  188. BorderBrush="Gray"
  189. BorderThickness="2"
  190. Click="button_YES_Click" >
  191. <!--Закругленные углы-->
  192. <Button.Resources>
  193. <Style TargetType="Border">
  194. <Setter Property="CornerRadius"
  195. Value="5"/>
  196. </Style>
  197. </Button.Resources>
  198. <Button.Effect>
  199. <DropShadowEffect Direction="270" BlurRadius="10"/>
  200. </Button.Effect>
  201. <!--Градиентовый фон для кнопки-->
  202. <Button.Background>
  203. <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
  204. <GradientStop Color="#282c36" Offset="0.0"/>
  205. <GradientStop Color="#FF661579" Offset="0.5"/>
  206. <GradientStop Color="#282c36" Offset="1.0"/>
  207. </LinearGradientBrush>
  208. </Button.Background>
  209. </Button>
  210. <!--* Кнопка "Нет" *-->
  211. <Button Style="{DynamicResource buttonNo}"
  212. x:Name="button_NO"
  213. Content="Нет, я еще новенький"
  214. VerticalAlignment="Top"
  215. Height="60"
  216. FontFamily="Fregat"
  217. FontSize="20"
  218. Margin="60 0 60 0"
  219. Foreground="White"
  220. BorderBrush="Gray"
  221. Click="button_NO_Click"
  222. BorderThickness="2">
  223. <!--Закругленные углы-->
  224. <Button.Resources>
  225. <Style TargetType="Border">
  226. <Setter Property="CornerRadius"
  227. Value="5"/>
  228. </Style>
  229. </Button.Resources>
  230. <Button.Effect>
  231. <DropShadowEffect Direction="270" BlurRadius="10"/>
  232. </Button.Effect>
  233. <!--Градиентовый фон для кнопки-->
  234. <Button.Background>
  235. <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
  236. <GradientStop Color="#282c36" Offset="0.0"/>
  237. <GradientStop Color="#FF661579" Offset="0.5"/>
  238. <GradientStop Color="#282c36" Offset="1.0"/>
  239. </LinearGradientBrush>
  240. </Button.Background>
  241. </Button>
  242. </StackPanel>
  243. <!--Изображение для закрытия формы-->
  244. <Image x:Name="Image_cross"
  245. Width="35"
  246. Height="35"
  247. HorizontalAlignment="Right"
  248. VerticalAlignment="Top"
  249. Margin="0 0 0 0"
  250. MouseDown="Image_cross_MouseDown">
  251. <Image.Effect>
  252. <DropShadowEffect Direction="270" BlurRadius="10"/>
  253. </Image.Effect>
  254. <!--Триггер для отображения второй картинки-->
  255. <Image.Style>
  256. <Style TargetType="{x:Type Image}">
  257. <Setter Property="Source"
  258. Value="Resources/Images/cross_NotActivate.png"/>
  259. <Style.Triggers>
  260. <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_cross}"
  261. Value="True">
  262. <Setter Property="Source"
  263. Value="Resources/Images/cross_Activate.png"/>
  264. </DataTrigger>
  265. </Style.Triggers>
  266. </Style>
  267. </Image.Style>
  268. </Image>
  269. </Grid>
  270. </Border>
  271. </Window>