终端一体化运控平台
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.
 
 
 

85 Zeilen
6.7 KiB

  1. <Window x:Class="BPASmartClient.MorkBF.VIew.FoodManagerView"
  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.MorkBF.VIew"
  7. xmlns:con="clr-namespace:BPASmartClient.MorkBF.Convert"
  8. xmlns:vm ="clr-namespace:BPASmartClient.MorkBF.ViewModel"
  9. mc:Ignorable="d"
  10. Title="FoodManagerView" Height="450" Width="1020" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent">
  11. <Window.DataContext>
  12. <vm:FoodManagerViewModel/>
  13. </Window.DataContext>
  14. <Window.Resources>
  15. <ResourceDictionary>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  18. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  19. </ResourceDictionary.MergedDictionaries>
  20. <con:StirToVisibilityConverter x:Key="StirToVisibilityConverter" />
  21. <con:FirePositionToVisibilityConverter x:Key="FirePositionToVisibilityConverter" />
  22. <con:AccessoriesToVisibilityConverter x:Key="AccessoriesToVisibilityConverter" />
  23. </ResourceDictionary>
  24. </Window.Resources>
  25. <Border CornerRadius="1,60,00,70" Background="#1E1E1E" >
  26. <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown" Margin="0,-4,0,4">
  27. <Grid.Background>
  28. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不规则矩形.png"/>
  29. </Grid.Background>
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="50"/>
  32. <RowDefinition Height="*"/>
  33. <RowDefinition Height="50"/>
  34. </Grid.RowDefinitions>
  35. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Height="45">
  36. <TextBlock Text="菜品名称:" Margin="10,0"/>
  37. <TextBox Text="{Binding GoodName}" Width="160" Margin="10,0" FontSize="16"/>
  38. <Button Content="添加新步骤" Margin="10,0" Style="{StaticResource ButtonStyle}" Height="36" Command="{Binding AddCommand}"/>
  39. <Button Content="保存" Margin="10,0" Style="{StaticResource ButtonStyle}" Height="36" Width="80" Command="{Binding SaveCommand}"/>
  40. <Button Content="退出" Margin="10,0" Style="{StaticResource ButtonStyle}" Height="36" Width="80" Click="Button_Click"/>
  41. </StackPanel>
  42. <Grid Grid.Row="1">
  43. <ListBox ItemsSource="{Binding FryPotProcesses}" FontSize="15" x:Name="mylist">
  44. <ListBox.ItemTemplate>
  45. <DataTemplate>
  46. <StackPanel Orientation="Horizontal" Margin="0,10">
  47. <TextBlock Text="步骤--" Margin="10,0,2,0" VerticalAlignment="Center"/>
  48. <TextBlock Text="{Binding FryTime,Mode=TwoWay}" VerticalAlignment="Center"/>
  49. <TextBlock Text="加热时间--" Margin="10,0,2,0" VerticalAlignment="Center"/>
  50. <TextBox Text="{Binding FryDuration}" Margin="10,0" Width="40" VerticalAlignment="Center"/>
  51. <TextBlock Text="动作--" Margin="10,0,2,0" VerticalAlignment="Center"/>
  52. <ComboBox ItemsSource="{Binding DataContext.FryAction,RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  53. SelectedItem="{Binding fryActions}" Width="100" IsReadOnly="True" Margin="2,0,10,0"/>
  54. <TextBlock Text="加热挡位--" Margin="10,0,2,0" VerticalAlignment="Center"/>
  55. <ComboBox ItemsSource="{Binding DataContext.Gear,RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  56. SelectedItem="{Binding FryGear}" Width="50" Margin="2,0,10,0" />
  57. <TextBlock Text="搅拌挡位--" Margin="10,0,2,0" VerticalAlignment="Center"
  58. Visibility="{Binding fryActions,Converter={StaticResource StirToVisibilityConverter}}"/>
  59. <ComboBox ItemsSource="{Binding DataContext.Gear,RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}" SelectedItem="{Binding StirGear}" Width="50" Margin="2,0,10,0"
  60. Visibility="{Binding fryActions,Converter={StaticResource StirToVisibilityConverter}}"/>
  61. <TextBlock Text="炒制位置--" Margin="10,0,2,0" VerticalAlignment="Center"
  62. Visibility="{Binding fryActions,Converter={StaticResource FirePositionToVisibilityConverter}}"/>
  63. <ComboBox ItemsSource="{Binding DataContext.PotPostion,RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor} }" SelectedItem="{Binding FryPosition}" Width="50" Margin="2,0,10,0"
  64. Visibility="{Binding fryActions,Converter={StaticResource FirePositionToVisibilityConverter}}"/>
  65. <TextBlock Text="物料位置--" Margin="10,0,2,0" VerticalAlignment="Center"
  66. Visibility="{Binding fryActions,Converter={StaticResource AccessoriesToVisibilityConverter}}"/>
  67. <TextBox Text="{Binding accessories[0].Loc}" VerticalAlignment="Center" Width="50"
  68. Visibility="{Binding fryActions,Converter={StaticResource AccessoriesToVisibilityConverter}}"/>
  69. <Button Content="删除" Margin="10,0" Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  70. CommandParameter="{Binding DataContext,RelativeSource={RelativeSource AncestorType=ListBoxItem,Mode=FindAncestor}}"/>
  71. </StackPanel>
  72. </DataTemplate>
  73. </ListBox.ItemTemplate>
  74. </ListBox>
  75. </Grid>
  76. <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="70,0" >
  77. <TextBlock Text="关火搅拌时间" Margin="10,0"/>
  78. <TextBox Text="{Binding FryOffStirTime}" Width="60"/>
  79. <TextBlock Text="秒" Margin="10"/>
  80. </StackPanel>
  81. </Grid>
  82. </Border>
  83. </Window>