终端一体化运控平台
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

81 lines
4.8 KiB

  1. <Window x:Class="BPASmartClient.MorkF.View.LocalMenu"
  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:BPASmartClient.MorkF.View"
  7. xmlns:vm="clr-namespace:BPASmartClient.MorkF.ViewModel"
  8. mc:Ignorable="d"
  9. Title="LocalMenu" Height="800" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" MouseLeftButtonDown="Window_MouseLeftButtonDown">
  10. <Window.DataContext>
  11. <vm:LocalMenuViewModel/>
  12. </Window.DataContext>
  13. <Window.Resources>
  14. <Style TargetType="ListBoxItem" >
  15. <Setter Property="Template">
  16. <Setter.Value>
  17. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  18. <Border BorderBrush="Black" BorderThickness="0" Background="White">
  19. <Grid Width="600" HorizontalAlignment="Center" VerticalAlignment="Center" >
  20. <Grid.ColumnDefinitions>
  21. <ColumnDefinition/>
  22. <ColumnDefinition/>
  23. <ColumnDefinition Width="2*"/>
  24. <ColumnDefinition/>
  25. <ColumnDefinition/>
  26. <ColumnDefinition/>
  27. </Grid.ColumnDefinitions>
  28. <TextBox Grid.Column="0" Text="{Binding FryTime}" HorizontalAlignment="Center" VerticalAlignment="Center" />
  29. <TextBox Grid.Column="1" Text="{Binding During}" Margin="10,0"/>
  30. <ComboBox Grid.Column="2" Width="120" ItemsSource="{Binding DataContext.strPotActions , RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  31. SelectedValue="{Binding Actions}" Margin="10,0"/>
  32. <TextBox Grid.Column="3" Text="{Binding SeasoningLists[0].Loc}" Margin="10,0"/>
  33. <TextBox Grid.Column="4" Text="{Binding SeasoningLists[0].Qty}" Margin="10,0"/>
  34. <Button Grid.Column="5" Content="删除" Margin="10,0" HorizontalAlignment="Center"
  35. Command="{Binding DataContext.Delete, RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  36. CommandParameter="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBoxItem,Mode=FindAncestor}}"/>
  37. </Grid>
  38. </Border>
  39. </ControlTemplate>
  40. </Setter.Value>
  41. </Setter>
  42. </Style>
  43. </Window.Resources>
  44. <Grid>
  45. <Grid.RowDefinitions>
  46. <RowDefinition Height="50"/>
  47. <RowDefinition Height="50"/>
  48. <RowDefinition Height="*"/>
  49. </Grid.RowDefinitions>
  50. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  51. <Button Content="增加步骤" Command="{Binding AddFryTime}" Width="120" Height="40" Margin="10,0"/>
  52. <Button Content="保存" Command="{Binding Save}" Width="120" Height="40" Margin="10,0"/>
  53. <Button Content="退出" Click="Button_Click" Width="120" Height="40" Margin="10,0"/>
  54. </StackPanel>
  55. <Grid Grid.Row="1" Width="600" HorizontalAlignment="Center" VerticalAlignment="Center">
  56. <Grid.ColumnDefinitions>
  57. <ColumnDefinition/>
  58. <ColumnDefinition/>
  59. <ColumnDefinition Width="2*"/>
  60. <ColumnDefinition/>
  61. <ColumnDefinition/>
  62. <ColumnDefinition/>
  63. </Grid.ColumnDefinitions>
  64. <TextBlock Grid.Column="0" Text="步骤" HorizontalAlignment="Center"/>
  65. <TextBlock Grid.Column="1" Text="时间" HorizontalAlignment="Center"/>
  66. <TextBlock Grid.Column="2" Text="动作" HorizontalAlignment="Center"/>
  67. <TextBlock Grid.Column="3" Text="调料位置" HorizontalAlignment="Center"/>
  68. <TextBlock Grid.Column="4" Text="调料重量" HorizontalAlignment="Center"/>
  69. <TextBlock Grid.Column="5" Text="删除" HorizontalAlignment="Center"/>
  70. </Grid>
  71. <ListBox x:Name="listview1" Grid.Row="2" BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Center" AllowDrop="True"
  72. ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding PotActionStep}" Margin=" 10" Background="Transparent"
  73. >
  74. </ListBox>
  75. </Grid>
  76. </Window>