Authorization.xaml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. <Window x:Class="Hammer_store.Authorization"
  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="400"
  9. Width="500"
  10. ResizeMode="NoResize"
  11. WindowStartupLocation="CenterScreen"
  12. WindowStyle="None"
  13. AllowsTransparency="True"
  14. Background="Transparent"
  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="CustomButtonLogin" 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="CustomButtonBack" 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. <Grid.RowDefinitions>
  153. <RowDefinition Height="35"/>
  154. <RowDefinition Height="70"/>
  155. <RowDefinition Height="85"/>
  156. <RowDefinition Height="85"/>
  157. <RowDefinition Height="115"/>
  158. <RowDefinition/>
  159. </Grid.RowDefinitions>
  160. <!--* ТайтлБар для опций с окном *-->
  161. <Grid Name="TitleBar"
  162. Grid.Row="0"
  163. Background="Transparent"
  164. MouseDown="TitleBar_MouseDown">
  165. <!--Изображение для закрытия формы-->
  166. <Image x:Name="Image_cross"
  167. Width="35"
  168. Height="35"
  169. HorizontalAlignment="Right"
  170. Margin="0 0 0 0"
  171. MouseDown="Image_cross_MouseDown">
  172. <Image.Effect>
  173. <DropShadowEffect Direction="270" BlurRadius="10"/>
  174. </Image.Effect>
  175. <Image.Style>
  176. <Style TargetType="{x:Type Image}">
  177. <Setter Property="Source"
  178. Value="Resources/Images/cross_NotActivate.png"/>
  179. <Style.Triggers>
  180. <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_cross}"
  181. Value="True">
  182. <Setter Property="Source"
  183. Value="Resources/Images/cross_Activate.png"/>
  184. </DataTrigger>
  185. </Style.Triggers>
  186. </Style>
  187. </Image.Style>
  188. </Image>
  189. <!--Изображение для сворачивания формы-->
  190. <Image x:Name="Image_colapso"
  191. Width="25"
  192. Height="25"
  193. HorizontalAlignment="Right"
  194. Margin="0 0 40 0"
  195. MouseDown="Image_colapso_MouseDown">
  196. <Image.Effect>
  197. <DropShadowEffect Direction="270" BlurRadius="10"/>
  198. </Image.Effect>
  199. <Image.Style>
  200. <Style TargetType="{x:Type Image}">
  201. <Setter Property="Source"
  202. Value="Resources/Images/colapsoOne.png"/>
  203. <Style.Triggers>
  204. <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_colapso}"
  205. Value="True">
  206. <Setter Property="Source"
  207. Value="Resources/Images/colapsoTwo.png"/>
  208. </DataTrigger>
  209. </Style.Triggers>
  210. </Style>
  211. </Image.Style>
  212. </Image>
  213. </Grid>
  214. <!--* Заголовок для формы *-->
  215. <Grid Name="Header"
  216. Grid.Row="1">
  217. <Label Content="Авторизация"
  218. HorizontalAlignment="Center"
  219. Foreground="Black"
  220. FontFamily="Fregat"
  221. FontSize="40"
  222. Height="50"
  223. Margin="0 0 0 0"
  224. Background="White"
  225. BorderThickness="0,0,0,0">
  226. <!--Закругленные углы-->
  227. <Label.Resources>
  228. <Style TargetType="Border">
  229. <Setter Property="CornerRadius"
  230. Value="5"/>
  231. </Style>
  232. </Label.Resources>
  233. <Label.Effect>
  234. <DropShadowEffect Direction="270" BlurRadius="10"/>
  235. </Label.Effect>
  236. </Label>
  237. </Grid>
  238. <!--* Поле ввода логина *-->
  239. <Grid Name="FieldLogin"
  240. Grid.Row="2">
  241. <!--Метка "Логин"-->
  242. <Label Content="Логин"
  243. VerticalAlignment="Top"
  244. HorizontalAlignment="Left"
  245. FontFamily="Fregat"
  246. Foreground="White"
  247. FontSize="30"
  248. Margin="103 0 0 0"/>
  249. <!--Поле ввода "Логина"-->
  250. <TextBox x:Name="textBox_InputLogin"
  251. Margin="105,0,0,10"
  252. FontSize="25"
  253. Padding="3,5,3,3"
  254. HorizontalAlignment="Left"
  255. VerticalAlignment="Bottom"
  256. Width="280"
  257. Height="40"
  258. FontFamily="Fregat"
  259. BorderBrush="{x:Null}"
  260. SelectionBrush="#FF9A00D7"
  261. BorderThickness="3,3,3,3"
  262. TabIndex="0"
  263. GotFocus="textBox_login_GotFocus"
  264. LostFocus="textBox_login_LostFocus">
  265. <TextBox.Resources>
  266. <Style TargetType="Border">
  267. <Setter Property="CornerRadius"
  268. Value="5"/>
  269. </Style>
  270. </TextBox.Resources>
  271. <TextBox.Effect>
  272. <DropShadowEffect Direction="270" BlurRadius="10"/>
  273. </TextBox.Effect>
  274. </TextBox>
  275. <!--Уведомления о неправильном логине-->
  276. <Label x:Name="labelErrorMessageOne_Login"
  277. Content="Ошибка. В начале не может быть числа!"
  278. HorizontalAlignment="Right"
  279. VerticalAlignment="Top"
  280. Background="Gray"
  281. Foreground="White"
  282. FontFamily="Fregat"
  283. Margin="0 0 40 0"
  284. FontSize="12"
  285. Visibility="Hidden">
  286. <Label.Resources>
  287. <Style TargetType="Border">
  288. <Setter Property="CornerRadius" Value="5"/>
  289. </Style>
  290. </Label.Resources>
  291. </Label>
  292. <Label x:Name="labelErrorMessageTwo_Login"
  293. Content="Ошибка. В начале не может быть спец. символа!"
  294. HorizontalAlignment="Right"
  295. VerticalAlignment="Top"
  296. Margin="0 0 5 0"
  297. Background="Gray"
  298. Foreground="White"
  299. FontFamily="Fregat"
  300. FontSize="12"
  301. Visibility="Hidden">
  302. <Label.Resources>
  303. <Style TargetType="Border">
  304. <Setter Property="CornerRadius" Value="5"/>
  305. </Style>
  306. </Label.Resources>
  307. </Label>
  308. <Label x:Name="labelErrorMessageThree_Login"
  309. Content="Ошибка. Такое имя уже существует!"
  310. HorizontalAlignment="Right"
  311. VerticalAlignment="Top"
  312. Margin="0 0 40 0"
  313. Foreground="White"
  314. Background="Gray"
  315. FontFamily="Fregat"
  316. FontSize="12"
  317. Visibility="Hidden">
  318. <Label.Resources>
  319. <Style TargetType="Border">
  320. <Setter Property="CornerRadius" Value="5"/>
  321. </Style>
  322. </Label.Resources>
  323. </Label>
  324. <Label x:Name="labelErrorMessageFour_Login"
  325. Content="Длина логина не может быть меньше 4 символов!"
  326. HorizontalAlignment="Right"
  327. VerticalAlignment="Top"
  328. Margin="0 0 5 0"
  329. Foreground="White"
  330. Background="Gray"
  331. FontFamily="Fregat"
  332. FontSize="12"
  333. Visibility="Hidden">
  334. <Label.Resources>
  335. <Style TargetType="Border">
  336. <Setter Property="CornerRadius" Value="5"/>
  337. </Style>
  338. </Label.Resources>
  339. </Label>
  340. <Label x:Name="labelErrorMessageFive_Login"
  341. Content="Ошибка. В логине не должны быть пробелы!"
  342. HorizontalAlignment="Right"
  343. VerticalAlignment="Top"
  344. Margin="0 0 20 0"
  345. Background="Gray"
  346. Foreground="White"
  347. FontFamily="Fregat"
  348. FontSize="12"
  349. Visibility="Hidden">
  350. <Label.Resources>
  351. <Style TargetType="Border">
  352. <Setter Property="CornerRadius" Value="5"/>
  353. </Style>
  354. </Label.Resources>
  355. </Label>
  356. <Polygon x:Name="ErrorMessagePolygon_Login"
  357. Width="50"
  358. Height="50"
  359. HorizontalAlignment="Right"
  360. VerticalAlignment="Top"
  361. Margin="0 -15 170 0"
  362. Fill="Gray"
  363. Points="15,35, 35,35 25,45"
  364. Visibility="Hidden"/>
  365. </Grid>
  366. <!--* Поле ввода пароля *-->
  367. <Grid Name="FieldPassword"
  368. Grid.Row="3">
  369. <!--Метка пароль-->
  370. <Label Content="Пароль"
  371. HorizontalAlignment="Left"
  372. VerticalAlignment="Top"
  373. FontFamily="Fregat"
  374. Foreground="White"
  375. FontSize="30"
  376. Margin="103 0 0 0"/>
  377. <!--Поле ввода пароля-->
  378. <PasswordBox x:Name="passwordBox_pass"
  379. HorizontalAlignment="Left"
  380. VerticalAlignment="Bottom"
  381. Margin="105 0 0 10"
  382. Width="280"
  383. Height="40"
  384. Padding="3,3,41,3"
  385. FontFamily="Fregat"
  386. FontSize="25"
  387. BorderBrush="{x:Null}"
  388. BorderThickness="3"
  389. SelectionBrush="#FF9A00D7"
  390. TabIndex="2"
  391. PasswordChar="●"
  392. LostFocus="passwordBox_pass_LostFocus"
  393. GotFocus="passwordBox_pass_GotFocus">
  394. <PasswordBox.Effect>
  395. <DropShadowEffect Direction="270" BlurRadius="10"/>
  396. </PasswordBox.Effect>
  397. <PasswordBox.Style>
  398. <Style TargetType="{x:Type PasswordBox}">
  399. <Style.Resources>
  400. <Style TargetType="Border">
  401. <Setter Property="CornerRadius" Value="5" />
  402. </Style>
  403. </Style.Resources>
  404. <Setter Property="Template">
  405. <Setter.Value>
  406. <ControlTemplate TargetType="{x:Type PasswordBox}">
  407. <Border x:Name="border"
  408. CornerRadius="5"
  409. BorderBrush="{TemplateBinding BorderBrush}"
  410. BorderThickness="{TemplateBinding BorderThickness}"
  411. Background="{TemplateBinding Background}"
  412. SnapsToDevicePixels="True">
  413. <ScrollViewer x:Name="PART_ContentHost"
  414. Focusable="false"
  415. HorizontalScrollBarVisibility="Hidden"
  416. VerticalScrollBarVisibility="Hidden"/>
  417. </Border>
  418. <ControlTemplate.Triggers>
  419. <Trigger Property="IsEnabled"
  420. Value="false">
  421. <Setter Property="Opacity"
  422. TargetName="border"
  423. Value="0.56"/>
  424. </Trigger>
  425. <Trigger Property="IsMouseOver"
  426. Value="true">
  427. <Setter Property="BorderBrush"
  428. TargetName="border"
  429. Value="#FF7EB4EA"/>
  430. </Trigger>
  431. <Trigger Property="IsKeyboardFocused"
  432. Value="true">
  433. <Setter Property="BorderBrush"
  434. TargetName="border"
  435. Value="#FF569DE5"/>
  436. </Trigger>
  437. </ControlTemplate.Triggers>
  438. </ControlTemplate>
  439. </Setter.Value>
  440. </Setter>
  441. <Style.Triggers>
  442. <MultiTrigger>
  443. <MultiTrigger.Conditions>
  444. <Condition Property="IsInactiveSelectionHighlightEnabled"
  445. Value="true"/>
  446. <Condition Property="IsSelectionActive"
  447. Value="false"/>
  448. </MultiTrigger.Conditions>
  449. <Setter Property="SelectionBrush"
  450. Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
  451. </MultiTrigger>
  452. </Style.Triggers>
  453. </Style>
  454. </PasswordBox.Style>
  455. </PasswordBox>
  456. <!--TextBox для отображения пароля-->
  457. <TextBox x:Name="textBox_OutputPass"
  458. HorizontalAlignment="Left"
  459. VerticalAlignment="Bottom"
  460. Margin="105 0 0 10"
  461. Width="280"
  462. Height="40"
  463. Padding="3,5,41,3"
  464. FontFamily="Fregat"
  465. FontSize="25"
  466. BorderBrush="{x:Null}"
  467. BorderThickness="3"
  468. SelectionBrush="#FF9A00D7"
  469. Visibility="Hidden"
  470. TabIndex="1">
  471. <TextBox.Resources>
  472. <Style TargetType="{x:Type Border}">
  473. <Setter Property="CornerRadius" Value="5" />
  474. </Style>
  475. </TextBox.Resources>
  476. </TextBox>
  477. <!--Глаз для скрытия пароля-->
  478. <Image x:Name="Image_EyeHide1"
  479. Width="35"
  480. Height="35"
  481. Margin="322,38,83,12"
  482. Visibility="Visible"
  483. MouseDown="Image_EyeHide1_MouseDown">
  484. <Image.Style>
  485. <Style TargetType="{x:Type Image}">
  486. <Setter Property="Source"
  487. Value="Resources/Images/eye_hideBlack.png"/>
  488. <Style.Triggers>
  489. <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_EyeHide1}"
  490. Value="True">
  491. <Setter Property="Source"
  492. Value="Resources/Images/eye_hideGreen.png"/>
  493. </DataTrigger>
  494. </Style.Triggers>
  495. </Style>
  496. </Image.Style>
  497. </Image>
  498. <!--Глаз для отображения пароля-->
  499. <Image x:Name="Image_EyeVisible1"
  500. Width="35"
  501. Height="35"
  502. Margin="322,38,83,12"
  503. MouseDown="Image_EyeVisible1_MouseDown"
  504. Visibility="Hidden">
  505. <Image.Style>
  506. <Style TargetType="{x:Type Image}">
  507. <Setter Property="Source"
  508. Value="Resources/Images/eye_visibleBlack.png"/>
  509. <Style.Triggers>
  510. <DataTrigger Binding="{Binding IsMouseOver, ElementName=Image_EyeVisible1}"
  511. Value="True">
  512. <Setter Property="Source"
  513. Value="Resources/Images/eye_visibleGreen.png"/>
  514. </DataTrigger>
  515. </Style.Triggers>
  516. </Style>
  517. </Image.Style>
  518. </Image>
  519. <!--Уведомления о неверно введенном пароле-->
  520. <Label x:Name="labelErrorMessageOne_Pass1"
  521. Content="В пароле присутствует кириллица"
  522. HorizontalAlignment="Right"
  523. VerticalAlignment="Top"
  524. Background="Gray"
  525. Margin="0 0 50 0"
  526. FontFamily="Fregat"
  527. Foreground="White"
  528. FontSize="12"
  529. Visibility="Hidden">
  530. <Label.Resources>
  531. <Style TargetType="Border">
  532. <Setter Property="CornerRadius" Value="5"/>
  533. </Style>
  534. </Label.Resources>
  535. </Label>
  536. <Label x:Name="labelErrorMessageTwo_Pass1"
  537. Content="Ошибка. Длина пароля меньше 7 символов!"
  538. HorizontalAlignment="Right"
  539. VerticalAlignment="Top"
  540. Margin="0 0 10 0"
  541. FontSize="12"
  542. Background="Gray"
  543. Foreground="White"
  544. FontFamily="Fregat"
  545. Visibility="Hidden">
  546. <Label.Resources>
  547. <Style TargetType="Border">
  548. <Setter Property="CornerRadius" Value="5"/>
  549. </Style>
  550. </Label.Resources>
  551. </Label>
  552. <Label x:Name="labelErrorMessageThree_Pass1"
  553. Content="Ошибка. В пароле не должны быть пробелы!"
  554. HorizontalAlignment="Right"
  555. VerticalAlignment="Top"
  556. Margin="0 0 10 0"
  557. FontSize="12"
  558. Background="Gray"
  559. Foreground="White"
  560. FontFamily="Fregat"
  561. Visibility="Hidden">
  562. <Label.Resources>
  563. <Style TargetType="Border">
  564. <Setter Property="CornerRadius" Value="5"/>
  565. </Style>
  566. </Label.Resources>
  567. </Label>
  568. <Polygon x:Name="ErrorMessagePolygon_Pass1"
  569. Width="50"
  570. Height="50"
  571. HorizontalAlignment="Right"
  572. VerticalAlignment="Top"
  573. Margin="0 -15 170 0"
  574. Fill="Gray"
  575. Points="15,35, 35,35 25,45"
  576. Visibility="Hidden"/>
  577. </Grid>
  578. <!--Базовые кнопки-->
  579. <Grid Name="BaseButtons"
  580. Grid.Row="4">
  581. <!--Кнопка входа-->
  582. <Button Style="{DynamicResource CustomButtonLogin}"
  583. x:Name="button_signIn"
  584. HorizontalAlignment="Center"
  585. VerticalAlignment="Top"
  586. Height="40"
  587. Width="90"
  588. Content="Войти"
  589. Foreground="White"
  590. BorderBrush="Gray"
  591. BorderThickness="2"
  592. Margin="0 10 0 0"
  593. FontSize="20"
  594. Click="button_signIn_Click"
  595. FontFamily="Fregat"
  596. TabIndex="2">
  597. <Button.Background>
  598. <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
  599. <GradientStop Color="#282c36" Offset="0.0"/>
  600. <GradientStop Color="#FF661579" Offset="0.5"/>
  601. <GradientStop Color="#282c36" Offset="1.0"/>
  602. </LinearGradientBrush>
  603. </Button.Background>
  604. <Button.Resources>
  605. <Style TargetType="Border">
  606. <Setter Property="CornerRadius"
  607. Value="5"/>
  608. </Style>
  609. </Button.Resources>
  610. <Button.Effect>
  611. <DropShadowEffect Direction="270" BlurRadius="10"/>
  612. </Button.Effect>
  613. </Button>
  614. <!--Кнопка назад-->
  615. <Button Style="{DynamicResource CustomButtonBack}" x:Name="button_backOnUserVerification"
  616. HorizontalAlignment="Left"
  617. VerticalAlignment="Bottom"
  618. Height="40"
  619. Width="90"
  620. Content="Назад"
  621. Foreground="White"
  622. BorderBrush="Gray"
  623. BorderThickness="3"
  624. FontSize="20"
  625. Margin="10 0 0 10"
  626. Click="button_backOnUserVerification_Click"
  627. FontFamily="Fregat"
  628. TabIndex="3">
  629. <Button.Background>
  630. <LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
  631. <GradientStop Color="#282c36" Offset="0.0"/>
  632. <GradientStop Color="#FF661579" Offset="0.5"/>
  633. <GradientStop Color="#282c36" Offset="1.0"/>
  634. </LinearGradientBrush>
  635. </Button.Background>
  636. <Button.Resources>
  637. <Style TargetType="Border">
  638. <Setter Property="CornerRadius"
  639. Value="5"/>
  640. </Style>
  641. </Button.Resources>
  642. <Button.Effect>
  643. <DropShadowEffect Direction="270" BlurRadius="10"/>
  644. </Button.Effect>
  645. </Button>
  646. </Grid>
  647. </Grid>
  648. </Border>
  649. </Window>