终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LocalMenu.xaml 8.3 KiB

2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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:i="http://schemas.microsoft.com/expression/2010/interactivity"
  7. xmlns:local="clr-namespace:BPASmartClient.MorkF.View"
  8. xmlns:vm="clr-namespace:BPASmartClient.MorkF.ViewModel"
  9. mc:Ignorable="d"
  10. Title="LocalMenu" Height="900" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" MouseLeftButtonDown="Window_MouseLeftButtonDown" Background="Gray"
  11. >
  12. <Window.DataContext>
  13. <vm:LocalMenuViewModel/>
  14. </Window.DataContext>
  15. <Window.Resources>
  16. <ResourceDictionary>
  17. <ResourceDictionary.MergedDictionaries>
  18. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  19. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  20. </ResourceDictionary.MergedDictionaries>
  21. <Style TargetType="ListBoxItem" x:Key="newFoodList" >
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  25. <Border BorderBrush="Black" BorderThickness="0" Background="Transparent" Margin="5">
  26. <StackPanel Orientation="Vertical">
  27. <TextBlock Text="步骤:"/>
  28. <TextBox Text="{Binding FryTime}" HorizontalAlignment="Center" VerticalAlignment="Center" />
  29. <ComboBox Width="120" ItemsSource="{Binding DataContext.strPotActions , RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  30. SelectedValue="{Binding Actions}" Margin="10,0"/>
  31. <TextBlock Text="时间"/>
  32. <TextBox Text="{Binding During}" Margin="10,0"/>
  33. <TextBox Text="{Binding SeasoningLists[0].Loc}" Margin="10,0"/>
  34. <TextBox Text="{Binding SeasoningLists[0].Qty}" Margin="10,0"/>
  35. <Button Content="删除" Margin="10,0" HorizontalAlignment="Center"/>
  36. </StackPanel>
  37. </Border>
  38. </ControlTemplate>
  39. </Setter.Value>
  40. </Setter>
  41. </Style>
  42. <Style TargetType="ListBoxItem" >
  43. <Setter Property="Template">
  44. <Setter.Value>
  45. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  46. <Border BorderBrush="Black" BorderThickness="0" Background="Transparent" Margin="5">
  47. <Grid Width="600" HorizontalAlignment="Center" VerticalAlignment="Center" >
  48. <Grid.ColumnDefinitions>
  49. <ColumnDefinition/>
  50. <ColumnDefinition/>
  51. <ColumnDefinition Width="2*"/>
  52. <ColumnDefinition/>
  53. <ColumnDefinition/>
  54. <ColumnDefinition/>
  55. </Grid.ColumnDefinitions>
  56. <TextBox Grid.Column="0" Text="{Binding FryTime}" HorizontalAlignment="Center" VerticalAlignment="Center" />
  57. <TextBox Grid.Column="1" Text="{Binding During}" Margin="10,0"/>
  58. <ComboBox Grid.Column="2" Width="120" ItemsSource="{Binding DataContext.strPotActions , RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  59. SelectedValue="{Binding Actions}" Margin="10,0"/>
  60. <TextBox Grid.Column="3" Text="{Binding SeasoningLists[0].Loc}" Margin="10,0"/>
  61. <TextBox Grid.Column="4" Text="{Binding SeasoningLists[0].Qty}" Margin="10,0"/>
  62. <Button Grid.Column="5" Content="删除" Margin="10,0" HorizontalAlignment="Center"
  63. Command="{Binding DataContext.Delete, RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  64. CommandParameter="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBoxItem,Mode=FindAncestor}}"/>
  65. </Grid>
  66. </Border>
  67. </ControlTemplate>
  68. </Setter.Value>
  69. </Setter>
  70. </Style>
  71. </ResourceDictionary>
  72. </Window.Resources>
  73. <Grid >
  74. <Grid.Background>
  75. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/内部背景.png"/>
  76. </Grid.Background>
  77. <Grid.RowDefinitions>
  78. <RowDefinition Height="80"/>
  79. <RowDefinition Height="80"/>
  80. <RowDefinition Height="50"/>
  81. <RowDefinition Height="*"/>
  82. </Grid.RowDefinitions>
  83. <StackPanel Margin="10,20,10,0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  84. <TextBox Text="{Binding MaterialName}" Width="80" Height="40" Margin="10,0"/>
  85. <Button Content="增加菜谱" Command="{Binding AddMaterial}" Width="80" Height="40" Margin="10,0"/>
  86. </StackPanel>
  87. <StackPanel Grid.Row="1" Margin="10,20,10,0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  88. <ComboBox Name="Materials" Width="100" Height="40" SelectionChanged="Materials_SelectionChanged" SelectedIndex="0" IsReadOnly="True"
  89. ItemsSource="{Binding MaterialNames}" SelectedItem="{Binding SelectMaterialName}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  90. <!--<Button Content="下单" Command="{Binding NewStartLocalMaterial}" Width="80" Height="40" Margin="10,0" Cursor="Hand"/>-->
  91. <!--<Button Content="菜谱重命名" Command="{Binding RenameMaterial}" Width="80" Height="40" Margin="10,0"/>-->
  92. <Button Content="删除菜谱" Command="{Binding DeleteMaterial}" Width="80" Height="40" Margin="10,0"/>
  93. <Button Content="增加步骤" Command="{Binding AddFryTime}" Width="80" Height="40" Margin="10,0"/>
  94. <Button Content="保存" Command="{Binding Save}" Width="80" Height="40" Margin="10,0"/>
  95. <Button Content="退出" Click="Button_Click" Width="80" Height="40" Margin="10,0"/>
  96. </StackPanel>
  97. <Grid Grid.Row="2" Width="600" HorizontalAlignment="Center" VerticalAlignment="Center">
  98. <Grid.ColumnDefinitions>
  99. <ColumnDefinition/>
  100. <ColumnDefinition/>
  101. <ColumnDefinition Width="2*"/>
  102. <ColumnDefinition/>
  103. <ColumnDefinition/>
  104. <ColumnDefinition/>
  105. </Grid.ColumnDefinitions>
  106. <TextBlock Grid.Column="0" Text="步骤" HorizontalAlignment="Center"/>
  107. <TextBlock Grid.Column="1" Text="时间" HorizontalAlignment="Center"/>
  108. <TextBlock Grid.Column="2" Text="动作" HorizontalAlignment="Center"/>
  109. <TextBlock Grid.Column="3" Text="调料位置" HorizontalAlignment="Center"/>
  110. <TextBlock Grid.Column="4" Text="调料重量" HorizontalAlignment="Center"/>
  111. <TextBlock Grid.Column="5" Text="删除" HorizontalAlignment="Center"/>
  112. </Grid>
  113. <ListBox x:Name="listview1" Grid.Row="3" BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Center" AllowDrop="True"
  114. ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding PotActionStep}" Margin=" 10" Background="Transparent"
  115. ItemContainerStyle="{DynamicResource newFoodList}"
  116. >
  117. </ListBox>
  118. </Grid>
  119. </Window>