EditOutletsView.axaml 13 KB

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