Regestration.xaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <Page x:Class="teaTime.Regestration"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:teaTime"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="Regestration" Background="#D3DB94">
  10. <Page.Resources>
  11. <Style x:Key="FocusVisual">
  12. <Setter Property="Control.Template">
  13. <Setter.Value>
  14. <ControlTemplate>
  15. <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
  16. </ControlTemplate>
  17. </Setter.Value>
  18. </Setter>
  19. </Style>
  20. <SolidColorBrush x:Key="Button.Static.Background" Color="#E8ECC8"/>
  21. <SolidColorBrush x:Key="Button.Static.Border" Color="#E8ECC8"/>
  22. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#E8ECC8"/>
  23. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#E8ECC8"/>
  24. <SolidColorBrush x:Key="Button.Pressed.Background" Color="#E8ECC8"/>
  25. <SolidColorBrush x:Key="Button.Pressed.Border" Color="#E8ECC8"/>
  26. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#E8ECC8"/>
  27. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#E8ECC8"/>
  28. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#E8ECC8"/>
  29. <Style x:Key="RoundedButtonStyle" TargetType="{x:Type Button}">
  30. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
  31. <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
  32. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
  33. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  34. <Setter Property="BorderThickness" Value="0"/>
  35. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  36. <Setter Property="VerticalContentAlignment" Value="Center"/>
  37. <Setter Property="Padding" Value="1"/>
  38. <Setter Property="Template">
  39. <Setter.Value>
  40. <ControlTemplate TargetType="{x:Type Button}">
  41. <Border x:Name="border" CornerRadius="10" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  42. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  43. </Border>
  44. <ControlTemplate.Triggers>
  45. <Trigger Property="IsDefaulted" Value="true">
  46. <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  47. </Trigger>
  48. <Trigger Property="IsMouseOver" Value="true">
  49. <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
  50. <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
  51. </Trigger>
  52. <Trigger Property="IsPressed" Value="true">
  53. <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
  54. <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
  55. </Trigger>
  56. <Trigger Property="IsEnabled" Value="false">
  57. <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
  58. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
  59. <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
  60. </Trigger>
  61. </ControlTemplate.Triggers>
  62. </ControlTemplate>
  63. </Setter.Value>
  64. </Setter>
  65. </Style>
  66. <Style x:Key="RoundedButtonStyle2" TargetType="{x:Type Button}">
  67. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
  68. <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
  69. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
  70. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  71. <Setter Property="BorderThickness" Value="0"/>
  72. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  73. <Setter Property="VerticalContentAlignment" Value="Center"/>
  74. <Setter Property="Padding" Value="1"/>
  75. <Setter Property="Template">
  76. <Setter.Value>
  77. <ControlTemplate TargetType="{x:Type Button}">
  78. <Border x:Name="border" CornerRadius="90" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  79. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  80. </Border>
  81. <ControlTemplate.Triggers>
  82. <Trigger Property="IsDefaulted" Value="true">
  83. <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  84. </Trigger>
  85. <Trigger Property="IsMouseOver" Value="true">
  86. <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
  87. <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
  88. </Trigger>
  89. <Trigger Property="IsPressed" Value="true">
  90. <Setter Property="Background" TargetName="border" Value="#E8ECC8"/>
  91. <Setter Property="BorderBrush" TargetName="border" Value="#E8ECC8"/>
  92. </Trigger>
  93. <Trigger Property="IsEnabled" Value="false">
  94. <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
  95. <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
  96. <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
  97. </Trigger>
  98. </ControlTemplate.Triggers>
  99. </ControlTemplate>
  100. </Setter.Value>
  101. </Setter>
  102. </Style>
  103. </Page.Resources>
  104. <Grid>
  105. <Viewbox Stretch="Uniform">
  106. <Border Width="500" Height="450" HorizontalAlignment="Center" VerticalAlignment="Center">
  107. <Grid>
  108. <StackPanel Margin="30,30,30,0">
  109. <TextBlock Text="Регистрация" FontFamily="{StaticResource GogoiaDeco}" FontSize="45" HorizontalAlignment="Center" Foreground="#A77748"/>
  110. <Grid>
  111. <Rectangle RadiusX="20" RadiusY="20" StrokeThickness="2" Fill="#FAEDCD" Width="370" Height="280"/>
  112. <StackPanel>
  113. <TextBlock Text="Фамилия" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55 15 0 0" VerticalAlignment="Top" />
  114. <TextBlock Text="Имя" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55 7 0 0" VerticalAlignment="Top" />
  115. <TextBlock Text="Отчество" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55 7 0 0" VerticalAlignment="Top" />
  116. <TextBlock Text="Телефон" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55 7 0 0" VerticalAlignment="Top" />
  117. <TextBlock Text="Почта" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55 7 0 0" VerticalAlignment="Top" />
  118. <TextBlock Text="Логин" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55 7 0 0" VerticalAlignment="Top" />
  119. <TextBlock Text="Пароль" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55 7 0 0" VerticalAlignment="Top" />
  120. <TextBlock Text="Пароль*" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="55 7 0 0" VerticalAlignment="Top" />
  121. </StackPanel>
  122. <StackPanel>
  123. <StackPanel Margin="125 7 0 0">
  124. <TextBox x:Name="aSurname" Width="260" Height="25" Text="" FontFamily="{StaticResource UniNeue-Regular}" HorizontalAlignment="Left" VerticalContentAlignment="Bottom" FontSize="12" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748"/>
  125. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  126. </StackPanel>
  127. <StackPanel Margin="125 5 0 0">
  128. <TextBox x:Name="aName" Width="260" Height="25" Text="" FontFamily="{StaticResource UniNeue-Regular}" HorizontalAlignment="Left" VerticalContentAlignment="Bottom" FontSize="12" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748"/>
  129. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  130. </StackPanel>
  131. <StackPanel Margin="125 7 0 0">
  132. <TextBox x:Name="aMiddleName" Width="260" Height="25" Text="" FontFamily="{StaticResource UniNeue-Regular}" HorizontalAlignment="Left" VerticalContentAlignment="Bottom" FontSize="12" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748"/>
  133. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  134. </StackPanel>
  135. <StackPanel Margin="125 7.5 0 0">
  136. <TextBox x:Name="aPhoneNum" Width="260" Height="25" Text="" FontFamily="{StaticResource UniNeue-Regular}" HorizontalAlignment="Left" VerticalContentAlignment="Bottom" FontSize="12" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748"/>
  137. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  138. </StackPanel>
  139. <StackPanel Margin="125 4 0 0">
  140. <TextBox x:Name="aEmail" Width="260" Height="25" Text="" FontFamily="{StaticResource UniNeue-Regular}" HorizontalAlignment="Left" VerticalContentAlignment="Bottom" FontSize="12" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748"/>
  141. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  142. </StackPanel>
  143. <StackPanel Margin="125 6 0 0">
  144. <TextBox x:Name="aLogin" Width="260" Height="25" Text="" FontFamily="{StaticResource UniNeue-Regular}" HorizontalAlignment="Left" VerticalContentAlignment="Bottom" FontSize="12" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748"/>
  145. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  146. </StackPanel>
  147. <StackPanel Margin="125 12 0 0">
  148. <PasswordBox x:Name="aPass" Password="" Width="260" Height="20" FontFamily="{StaticResource UniNeue-Regular}" FontSize="12" VerticalContentAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Center" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748"/>
  149. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  150. </StackPanel>
  151. <StackPanel Margin="125 12 0 0">
  152. <PasswordBox x:Name="arePass" Password="" Width="260" Height="20" FontFamily="{StaticResource UniNeue-Regular}" FontSize="12" VerticalContentAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Center" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748"/>
  153. <Line X1="0" Y1="0" X2="260" Y2="0" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#A77748" />
  154. </StackPanel>
  155. </StackPanel>
  156. <StackPanel Orientation="Vertical">
  157. <Ellipse x:Name="eSurname" Fill="#F1736F" Width="15" Height="15" Margin="10 15 0 0" HorizontalAlignment="Right" ToolTip="Фамилия должна начинаться с заглавной буквы и состоять больше чем из 2 букв" Visibility="Hidden"/>
  158. <Ellipse x:Name="eName" Fill="#F1736F" Width="15" Height="15" Margin="10 15 0 0" HorizontalAlignment="Right" ToolTip="Имя должно начинаться с заглавной буквы и состоять больше чем из 2 букв" Visibility="Hidden"/>
  159. <Ellipse x:Name="eMiddleName" Fill="#F1736F" Width="15" Height="15" Margin="10 15 0 0" HorizontalAlignment="Right" ToolTip="Отчество должно начинаться с заглавной буквы и состоять больше чем из 2 букв" Visibility="Hidden"/>
  160. <Ellipse x:Name="ePhoneNumber" Fill="#F1736F" Width="15" Height="15" Margin="10 20 0 0" HorizontalAlignment="Right" ToolTip="Пример телефона: +79584753100" Visibility="Hidden"/>
  161. <Ellipse x:Name="eEmail" Fill="#F1736F" Width="15" Height="15" Margin="10 15 0 0" HorizontalAlignment="Right" ToolTip="Пример почты: e_mail@pochta.com" Visibility="Hidden"/>
  162. <Ellipse x:Name="eLogin" Fill="#F1736F" Width="15" Height="15" Margin="10 15 0 0" HorizontalAlignment="Right" ToolTip="Логин не уникален, попробуйте другой вариант" Visibility="Hidden"/>
  163. <Ellipse x:Name="ePass" Fill="#F1736F" Width="15" Height="15" Margin="10 15 0 0" HorizontalAlignment="Right" ToolTip="введенные пароли не совпадают" Visibility="Hidden"/>
  164. </StackPanel>
  165. </Grid>
  166. <Button x:Name="bReg" Width="170" Height="35" Margin="0 15 0 0" Click="bReg_Click"
  167. Foreground="#A77748" Background="#FAEDCD"
  168. Content="Зарегистрироваться" FontFamily="{StaticResource GogoiaDeco}" FontSize="20"
  169. BorderThickness="0" Style="{DynamicResource RoundedButtonStyle}"/>
  170. </StackPanel>
  171. <Button x:Name="bClose" Width="35" Height="35" Margin="0 10 0 0" Click="bClose_Click" HorizontalAlignment="Right" VerticalAlignment="Top" Background="#FAEDCD" BorderThickness="0" Style="{DynamicResource RoundedButtonStyle2}">
  172. <Button.Content>
  173. <Grid>
  174. <Line X1="3" Y1="3" X2="20" Y2="20" Stroke="#D3DB94" StrokeDashArray="0.01" StrokeDashCap="Round" StrokeThickness="5"/>
  175. <Line X1="3" Y1="20" X2="20" Y2="3" Stroke="#D3DB94" StrokeDashArray="0.01" StrokeDashCap="Round" StrokeThickness="5" />
  176. </Grid>
  177. </Button.Content>
  178. </Button>
  179. </Grid>
  180. </Border>
  181. </Viewbox>
  182. </Grid>
  183. </Page>