AddEmployeesView.axaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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:vm="using:Acosta.ViewModels"
  5. x:DataType="vm:MainWindowViewModel"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. mc:Ignorable="d" d:DesignWidth="1920" d:DesignHeight="1080"
  8. x:Class="Acosta.Views.AddEmployeesView">
  9. <Grid>
  10. <StackPanel Width="1550" Height="50" Background="#E40714" VerticalAlignment="Top">
  11. <StackPanel.Styles>
  12. <Style Selector="TextBlock.headerLogo">
  13. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  14. <Setter Property="FontFamily" Value="Roboto"></Setter>
  15. <Setter Property="FontWeight" Value="Regular"></Setter>
  16. <Setter Property="FontSize" Value="35"></Setter>
  17. <Setter Property="Margin" Value="30 0 0 0"></Setter>
  18. </Style>
  19. <Style Selector="TextBlock.greeting">
  20. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  21. <Setter Property="FontFamily" Value="Roboto"></Setter>
  22. <Setter Property="FontWeight" Value="Medium"></Setter>
  23. <Setter Property="FontSize" Value="20"></Setter>
  24. </Style>
  25. <Style Selector="Button.headerBt">
  26. <Setter Property="Background" Value="Transparent"></Setter>
  27. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  28. <Setter Property="FontFamily" Value="Roboto"></Setter>
  29. <Setter Property="FontSize" Value="20"></Setter>
  30. <Setter Property="FontWeight" Value="Medium"></Setter>
  31. <Setter Property="Margin" Value="0 5 0 0"></Setter>
  32. </Style>
  33. <Style Selector="Button.headerBt:pointerover /template/ ContentPresenter">
  34. <Setter Property="Background" Value="Transparent"></Setter>
  35. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  36. <Setter Property="TextBlock.TextDecorations" Value="Underline"></Setter>
  37. <Setter Property="FontWeight" Value="Medium"></Setter>
  38. <Setter Property="FontSize" Value="20"></Setter>
  39. </Style>
  40. <Style Selector="Button.headerBt:pressed">
  41. <Setter Property="RenderTransform" Value="none"/>
  42. </Style>
  43. </StackPanel.Styles>
  44. <StackPanel Orientation="Horizontal">
  45. <TextBlock Classes="headerLogo">Acosta</TextBlock>
  46. <TextBlock Classes="greeting" Margin="670 12 0 0">Добро пожаловать, оператор</TextBlock>
  47. <TextBlock Classes="greeting" Margin="7 12 0 0" FontWeight="Bold" Name="FIO">Фамилия И.О.</TextBlock>
  48. <TextBlock Classes="greeting" Margin="10 10 0 0">/</TextBlock>
  49. <Button Classes="headerBt" Command="">Изменить пароль</Button>
  50. <TextBlock Classes="greeting" Margin="0 10 0 0">/</TextBlock>
  51. <Button Classes="headerBt" Command="{Binding ExitFromProfile}">Выйти</Button>
  52. </StackPanel>
  53. </StackPanel>
  54. <StackPanel Orientation="Vertical">
  55. <StackPanel.Styles>
  56. <Style Selector="TextBlock.TextToTextBox">
  57. <Setter Property="Foreground" Value="Black"></Setter>
  58. <Setter Property="FontFamily" Value="Roboto"></Setter>
  59. <Setter Property="FontWeight" Value="Regular"></Setter>
  60. <Setter Property="FontSize" Value="18"></Setter>
  61. <Setter Property="Margin" Value="200 30 0 0"></Setter>
  62. </Style>
  63. <Style Selector="TextBox">
  64. <Setter Property="Background" Value="#FFF8F8"></Setter>
  65. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  66. <Setter Property="CornerRadius" Value="9"></Setter>
  67. <Setter Property="BorderThickness" Value="2"></Setter>
  68. <Setter Property="FontSize" Value="18"></Setter>
  69. <Setter Property="FontFamily" Value="Roboto"></Setter>
  70. </Style>
  71. <Style Selector="TextBox:pointerover /template/ TextBlock#PART_Watermark">
  72. <Setter Property="TextBox.BorderBrush" Value="#A10009" />
  73. </Style>
  74. <Style Selector="TextBox:focus /template/ TextBlock#PART_Watermark">
  75. <Setter Property="TextBox.BorderBrush" Value="#A10009" />
  76. </Style>
  77. <Style Selector="TextBlock.TextBtBack">
  78. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  79. <Setter Property="FontFamily" Value="Roboto"></Setter>
  80. <Setter Property="FontWeight" Value="Medium"></Setter>
  81. <Setter Property="FontSize" Value="20"></Setter>
  82. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  83. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  84. </Style>
  85. <Style Selector="TextBlock.Chapter">
  86. <Setter Property="Foreground" Value="Black"></Setter>
  87. <Setter Property="FontFamily" Value="Roboto"></Setter>
  88. <Setter Property="FontWeight" Value="Medium"></Setter>
  89. <Setter Property="FontSize" Value="20"></Setter>
  90. <Setter Property="Margin" Value="30 85 0 0"></Setter>
  91. </Style>
  92. <Style Selector="Button.BtBack">
  93. <Setter Property="Width" Value="140"></Setter>
  94. <Setter Property="Height" Value="40"></Setter>
  95. <Setter Property="Margin" Value="30 80 0 0"></Setter>
  96. <Setter Property="Background" Value="#E40714"></Setter>
  97. <Setter Property="CornerRadius" Value="13"></Setter>
  98. </Style>
  99. <Style Selector="Button.BtBack:pointerover /template/ ContentPresenter">
  100. <Setter Property="Background" Value="#A10009"></Setter>
  101. </Style>
  102. <Style Selector="Button.BtBack:pressed">
  103. <Setter Property="RenderTransform" Value="none"/>
  104. </Style>
  105. <Style Selector="Button.BtAdd">
  106. <Setter Property="Height" Value="35"></Setter>
  107. <Setter Property="Margin" Value="620 80 0 0"></Setter>
  108. <Setter Property="Background" Value="#E40714"></Setter>
  109. <Setter Property="CornerRadius" Value="13"></Setter>
  110. </Style>
  111. <Style Selector="Button.BtAdd:pointerover /template/ ContentPresenter">
  112. <Setter Property="Background" Value="#A10009"></Setter>
  113. </Style>
  114. <Style Selector="TextBlock.TextBtAdd">
  115. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  116. <Setter Property="FontFamily" Value="Roboto"></Setter>
  117. <Setter Property="FontWeight" Value="Medium"></Setter>
  118. <Setter Property="FontSize" Value="20"></Setter>
  119. <Setter Property="Margin" Value="20 0 0 0"></Setter>
  120. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  121. </Style>
  122. <Style Selector="ComboBox.TextToComboBox">
  123. <Setter Property="Background" Value="#FFF8F8"></Setter>
  124. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  125. <Setter Property="CornerRadius" Value="9"></Setter>
  126. <Setter Property="BorderThickness" Value="2"></Setter>
  127. <Setter Property="FontSize" Value="18"></Setter>
  128. <Setter Property="FontFamily" Value="Roboto"></Setter>
  129. </Style>
  130. <Style Selector="Button.BtAdd:pressed">
  131. <Setter Property="RenderTransform" Value="none"/>
  132. </Style>
  133. <Style Selector="CheckBox.TextToCheckBox">
  134. <Setter Property="FontSize" Value="18"></Setter>
  135. <Setter Property="FontFamily" Value="Roboto"></Setter>
  136. </Style>
  137. <Style Selector="CheckBox.TextToCheckBox /template/ Border#NormalRectangle">
  138. <Setter Property="BorderBrush" Value="#E40714"/>
  139. <Setter Property="CornerRadius" Value="5"></Setter>
  140. </Style>
  141. </StackPanel.Styles>
  142. <StackPanel Orientation="Horizontal">
  143. <Button Classes="BtBack" Command="{Binding BackEmployeesView}">
  144. <TextBlock Classes="TextBtBack">Назад</TextBlock>
  145. </Button>
  146. <TextBlock Classes="Chapter">Добавление данных о новом сотруднике</TextBlock>
  147. </StackPanel>
  148. <ScrollViewer Height="600">
  149. <StackPanel Orientation="Vertical">
  150. <StackPanel Orientation="Horizontal">
  151. <TextBlock Classes="TextToTextBox">ID:</TextBlock>
  152. <TextBox Watermark="ID" Width="360" Margin="218 20 0 0"></TextBox>
  153. </StackPanel>
  154. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  155. <StackPanel Orientation="Horizontal">
  156. <TextBlock Classes="TextToTextBox">Фамилия:</TextBlock>
  157. <TextBox Watermark="Фималия" Width="360" Margin="160 20 0 0"></TextBox>
  158. </StackPanel>
  159. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  160. <StackPanel Orientation="Horizontal">
  161. <TextBlock Classes="TextToTextBox">Имя:</TextBlock>
  162. <TextBox Watermark="Имя" Width="360" Margin="200 20 0 0"></TextBox>
  163. </StackPanel>
  164. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  165. <StackPanel Orientation="Horizontal">
  166. <TextBlock Classes="TextToTextBox">Отчетсво:</TextBlock>
  167. <TextBox Watermark="Отчетсво" Width="360" Margin="156 20 0 0"></TextBox>
  168. </StackPanel>
  169. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  170. <StackPanel Orientation="Horizontal">
  171. <TextBlock Classes="TextToTextBox">Почта:</TextBlock>
  172. <TextBox Watermark="Почта" Width="360" Margin="183 20 0 0"></TextBox>
  173. </StackPanel>
  174. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  175. <StackPanel Orientation="Horizontal">
  176. <TextBlock Classes="TextToTextBox">Пароль:</TextBlock>
  177. <TextBox Watermark="Пароль" Width="360" Margin="170 20 0 0"></TextBox>
  178. </StackPanel>
  179. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  180. <StackPanel Orientation="Horizontal">
  181. <TextBlock Classes="TextToTextBox">Телефон:</TextBlock>
  182. <TextBox Watermark="Телефон" Width="360" Margin="165 20 0 0"></TextBox>
  183. </StackPanel>
  184. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  185. <StackPanel Orientation="Horizontal">
  186. <TextBlock Classes="TextToTextBox">Роль:</TextBlock>
  187. <TextBox Watermark="Роль" Width="360" Margin="200 20 0 0"></TextBox>
  188. </StackPanel>
  189. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="197 30 0 10" HorizontalAlignment="Left"></Border>
  190. <StackPanel Orientation="Vertical">
  191. <TextBlock Classes="TextToTextBox">Проекты:</TextBlock>
  192. <CheckBox Classes="TextToCheckBox" Margin="202 10 0 0">
  193. <TextBlock>Проект “...”</TextBlock>
  194. </CheckBox>
  195. <CheckBox Classes="TextToCheckBox" Margin="202 10 0 0">
  196. <TextBlock>Проект “...”</TextBlock>
  197. </CheckBox>
  198. <CheckBox Classes="TextToCheckBox" Margin="202 10 0 0">
  199. <TextBlock>Проект “...”</TextBlock>
  200. </CheckBox>
  201. </StackPanel>
  202. </StackPanel>
  203. </ScrollViewer>
  204. </StackPanel>
  205. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  206. <StackPanel.Styles>
  207. <Style Selector="TextBlock.TextBtDelete">
  208. <Setter Property="Foreground" Value="#E40714"></Setter>
  209. <Setter Property="FontFamily" Value="Roboto"></Setter>
  210. <Setter Property="FontWeight" Value="Medium"></Setter>
  211. <Setter Property="FontSize" Value="20"></Setter>
  212. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  213. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  214. </Style>
  215. <Style Selector="Button.BtDelete">
  216. <Setter Property="BorderThickness" Value="2"></Setter>
  217. <Setter Property="Width" Value="180"></Setter>
  218. <Setter Property="Height" Value="38"></Setter>
  219. <Setter Property="Margin" Value="0 740 70 20"></Setter>
  220. <Setter Property="Background" Value="Transparent"></Setter>
  221. <Setter Property="CornerRadius" Value="13"></Setter>
  222. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  223. </Style>
  224. <Style Selector="Button.BtDelete:pointerover /template/ ContentPresenter">
  225. <Setter Property="BorderBrush" Value="#A10009"></Setter>
  226. <Setter Property="Background" Value="Transparent"></Setter>
  227. </Style>
  228. <Style Selector="Button.BtDelete:pressed">
  229. <Setter Property="RenderTransform" Value="none"/>
  230. </Style>
  231. <Style Selector="TextBlock.TextBtSave">
  232. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  233. <Setter Property="FontFamily" Value="Roboto"></Setter>
  234. <Setter Property="FontWeight" Value="Medium"></Setter>
  235. <Setter Property="FontSize" Value="20"></Setter>
  236. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  237. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  238. </Style>
  239. <Style Selector="Button.BtSave">
  240. <Setter Property="Width" Value="180"></Setter>
  241. <Setter Property="Height" Value="38"></Setter>
  242. <Setter Property="Margin" Value="0 740 30 20"></Setter>
  243. <Setter Property="Background" Value="#E40714"></Setter>
  244. <Setter Property="CornerRadius" Value="13"></Setter>
  245. </Style>
  246. <Style Selector="Button.BtSave:pointerover /template/ ContentPresenter">
  247. <Setter Property="Background" Value="#A10009"></Setter>
  248. </Style>
  249. <Style Selector="Button.BtSave:pressed">
  250. <Setter Property="RenderTransform" Value="none"/>
  251. </Style>
  252. </StackPanel.Styles>
  253. <Button Classes="BtDelete" Command="">
  254. <TextBlock Classes="TextBtDelete">Удалить</TextBlock>
  255. </Button>
  256. <Button Classes="BtSave" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).SaveUser}">
  257. <TextBlock Classes="TextBtSave">Добавить</TextBlock>
  258. </Button>
  259. </StackPanel>
  260. </Grid>
  261. </UserControl>