终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

125 linhas
7.5 KiB

  1. <Window x:Class="BPASmart.RecipeManagement.View.CreateOrder"
  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:BPASmart.RecipeManagement.View"
  7. xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
  8. mc:Ignorable="d"
  9. Title="CreateOrder" Height="300" Width="500" WindowStartupLocation="CenterScreen" WindowStyle="None" Background="Transparent" MouseLeftButtonDown="Window_MouseLeftButtonDown"
  10. AllowsTransparency="True" Foreground="#FF2AB2E7">
  11. <Window.DataContext>
  12. <vm:CreateOrderViewModel/>
  13. </Window.DataContext>
  14. <Window.Resources>
  15. </Window.Resources>
  16. <Border>
  17. <Border.Background>
  18. <ImageBrush ImageSource="../image/容器边框.png"/>
  19. </Border.Background>
  20. <Grid Background="Transparent">
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="50"/>
  23. <RowDefinition Height="*"/>
  24. <RowDefinition Height="40"/>
  25. <RowDefinition Height="5"/>
  26. </Grid.RowDefinitions>
  27. <TextBlock Text="创建订单" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Margin="0,3,0,0 "/>
  28. <Button Content="添加配方" Width="80" Height="24" HorizontalAlignment="Right" Margin="10,10,2,0" VerticalAlignment="Bottom"
  29. Style="{DynamicResource ButtonStyle}"
  30. Command="{Binding AddRecipeCommand}"/>
  31. <Border Grid.Row="1" BorderBrush="#B0E2FF" BorderThickness="0,1">
  32. <ItemsControl ItemsSource="{Binding recipes}" Grid.Row="1" HorizontalAlignment="Center">
  33. <ItemsControl.ItemTemplate>
  34. <DataTemplate>
  35. <RadioButton GroupName="all">
  36. <RadioButton.Template>
  37. <ControlTemplate TargetType="RadioButton">
  38. <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="1">
  39. <Grid Name="gr" Height="40">
  40. <Grid.ColumnDefinitions>
  41. <ColumnDefinition Width="150"/>
  42. <ColumnDefinition Width="100" />
  43. <ColumnDefinition Width="60" />
  44. </Grid.ColumnDefinitions>
  45. <ComboBox
  46. Name="cb"
  47. Grid.Column="0"
  48. Margin="3,1"
  49. VerticalAlignment="Center"
  50. FontFamily="楷体"
  51. FontSize="20"
  52. Foreground="#FF2AB2E7"
  53. IsEditable="False"
  54. ItemsSource="{Binding DataContext.recipesName, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  55. SelectedItem="{Binding Name}"
  56. />
  57. <StackPanel
  58. Grid.Column="1"
  59. VerticalAlignment="Center"
  60. Orientation="Horizontal">
  61. <TextBox
  62. Name="tb"
  63. Foreground="Orange"
  64. Background="Transparent"
  65. Grid.Column="1"
  66. Width="60"
  67. Height="29"
  68. Margin="3,1"
  69. VerticalAlignment="Center"
  70. FontSize="20"
  71. Text="{Binding RecipeCount}"
  72. />
  73. <TextBlock
  74. Grid.Column="1"
  75. Foreground="#FF2AB2E7"
  76. Margin="0,0,8,4"
  77. HorizontalAlignment="Right"
  78. VerticalAlignment="Center"
  79. FontSize="20"
  80. Text="单" />
  81. </StackPanel>
  82. <Button
  83. Grid.Column="2"
  84. Width="50"
  85. Height="24" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7"
  86. FontSize="14"
  87. Background="Transparent"
  88. Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
  89. CommandParameter="{Binding ID}"
  90. Content="删 除" />
  91. </Grid>
  92. </Border>
  93. </ControlTemplate>
  94. </RadioButton.Template>
  95. </RadioButton>
  96. </DataTemplate>
  97. </ItemsControl.ItemTemplate>
  98. </ItemsControl>
  99. </Border>
  100. <StackPanel Grid.Row="2" Grid.ColumnSpan="3" Orientation="Horizontal"
  101. HorizontalAlignment="Center" VerticalAlignment="Center">
  102. <Button Content="保存" FontSize="18" Width="100" Height="24" Margin="10,2" Background="Transparent"
  103. HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
  104. BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Style="{DynamicResource ButtonStyle}"
  105. Command="{Binding SaveCommand}"/>
  106. <Button Content="取消" FontSize="18" Width="100" Height="24" Margin="10,2" Background="Transparent"
  107. HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
  108. BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Style="{DynamicResource ButtonStyle}"
  109. Click="Button_Click"/>
  110. </StackPanel>
  111. </Grid>
  112. </Border>
  113. </Window>