终端一体化运控平台
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

163 Zeilen
7.6 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.DosingSystemSingle.View.OutletManagementView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:con="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.DosingSystemSingle.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  10. xmlns:vm="clr-namespace:BPASmartClient.DosingSystemSingle.ViewModel"
  11. d:DesignHeight="450"
  12. d:DesignWidth="800"
  13. mc:Ignorable="d">
  14. <UserControl.DataContext>
  15. <vm:OutletManagementViewModel />
  16. </UserControl.DataContext>
  17. <Grid Margin="10">
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="40" />
  20. <RowDefinition />
  21. </Grid.RowDefinitions>
  22. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  23. <Button
  24. Width="150"
  25. Height="40"
  26. Margin="10,0,10,0"
  27. Command="{Binding AddCommand}"
  28. Content="添加出料口"
  29. FontSize="20"
  30. Style="{StaticResource ImageButtonStyle}" />
  31. <Button
  32. Width="150"
  33. Height="40"
  34. Margin="10,0,10,0"
  35. Command="{Binding SaveCommand}"
  36. Content="保存参数"
  37. FontSize="20"
  38. Style="{StaticResource ImageButtonStyle}" />
  39. </StackPanel>
  40. <Grid Grid.Row="1">
  41. <ListView
  42. Margin="10"
  43. Background="Transparent"
  44. BorderBrush="#00BEFA"
  45. BorderThickness="0"
  46. ItemsSource="{Binding OutletInfoModels}"
  47. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  48. <ListView.ItemsPanel>
  49. <ItemsPanelTemplate>
  50. <WrapPanel Orientation="Horizontal" />
  51. </ItemsPanelTemplate>
  52. </ListView.ItemsPanel>
  53. <ListView.ItemTemplate>
  54. <DataTemplate>
  55. <Border
  56. Name="ShadowElement"
  57. Width="180"
  58. Height="150"
  59. Margin="10"
  60. VerticalAlignment="Top"
  61. BorderBrush="#00BEFA"
  62. BorderThickness="0"
  63. ClipToBounds="True"
  64. CornerRadius="0">
  65. <Border.Background>
  66. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/蓝色背景.png" Stretch="Fill" />
  67. </Border.Background>
  68. <Grid Margin="20,0">
  69. <Grid.RowDefinitions>
  70. <RowDefinition />
  71. <RowDefinition />
  72. <RowDefinition />
  73. </Grid.RowDefinitions>
  74. <TextBlock
  75. Grid.Row="0"
  76. Grid.ColumnSpan="2"
  77. Margin="0,10,0,0"
  78. VerticalAlignment="Center"
  79. FontSize="20"
  80. Foreground="#00BEFA"
  81. Text="{Binding OutletName}" />
  82. <StackPanel
  83. Grid.Row="1"
  84. VerticalAlignment="Center"
  85. Orientation="Horizontal">
  86. <TextBlock
  87. Grid.Row="1"
  88. FontSize="14"
  89. Foreground="#aa00BEFA"
  90. Text="出料口位置:" />
  91. <TextBlock
  92. Grid.Row="1"
  93. FontSize="14"
  94. Foreground="#aa00BEFA"
  95. Text="{Binding OutletLoc}" />
  96. </StackPanel>
  97. <Grid
  98. Name="gr"
  99. Grid.Row="2"
  100. Height="30"
  101. Margin="0,0,0,10">
  102. <Grid.ColumnDefinitions>
  103. <ColumnDefinition />
  104. <ColumnDefinition />
  105. </Grid.ColumnDefinitions>
  106. <pry:IcoButton
  107. Width="{Binding ElementName=gr, Path=ActualWidth}"
  108. Height="{Binding ElementName=gr, Path=ActualHeight}"
  109. Margin="4,4,3,0"
  110. HorizontalAlignment="Center"
  111. VerticalAlignment="Center"
  112. Background="#11F53F62"
  113. BorderThickness="0"
  114. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  115. CommandParameter="{Binding OutletName}"
  116. Content="删除"
  117. EnterBackground="#22F53F62"
  118. FontStyle="Normal"
  119. Foreground="#FFF53F62"
  120. IcoText="&#xe68e;"
  121. Style="{StaticResource IcoButtonStyle}" />
  122. <pry:IcoButton
  123. Grid.Column="1"
  124. Width="{Binding ElementName=gr, Path=ActualWidth}"
  125. Height="{Binding ElementName=gr, Path=ActualHeight}"
  126. Margin="3,4,4,0"
  127. HorizontalAlignment="Center"
  128. VerticalAlignment="Center"
  129. Background="#112AB2E7"
  130. BorderThickness="0"
  131. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  132. CommandParameter="{Binding OutletName}"
  133. Content="编辑"
  134. EnterBackground="#222AB2E7"
  135. Foreground="#FF2AB2E7"
  136. IcoText="&#xe636;"
  137. Style="{StaticResource IcoButtonStyle}" />
  138. </Grid>
  139. </Grid>
  140. </Border>
  141. </DataTemplate>
  142. </ListView.ItemTemplate>
  143. </ListView>
  144. </Grid>
  145. </Grid>
  146. </UserControl>