RecipeEditorView.xaml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <UserControl x:Class="VirgoUI.Client.Models.PMs.RecipeEditorView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:core="clr-namespace:Aitex.UI.RecipeEditor;assembly=RecipeEditorControl"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  8. xmlns:cal="http://www.caliburn.org"
  9. mc:Ignorable="d" IsEnabled="{Binding PageEnabled}"
  10. d:DesignHeight ="770" d:DesignWidth="1920">
  11. <UserControl.Resources>
  12. <Style TargetType="Button" x:Key="MiddleButton" BasedOn="{StaticResource {x:Type Button}}" />
  13. <Style TargetType="Button"></Style>
  14. </UserControl.Resources>
  15. <Grid>
  16. <Grid.ColumnDefinitions>
  17. <ColumnDefinition Width="300" />
  18. <ColumnDefinition Width="6" />
  19. <ColumnDefinition Width="800*" />
  20. </Grid.ColumnDefinitions>
  21. <Grid Grid.Column="0">
  22. <Grid.RowDefinitions>
  23. <RowDefinition Height="60"/>
  24. <RowDefinition Height="*"/>
  25. </Grid.RowDefinitions>
  26. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
  27. <StackPanel VerticalAlignment="Bottom">
  28. <StackPanel Orientation="Horizontal">
  29. <Button Content="New" Width="85" Height="30" Style="{StaticResource MiddleButton}" Click="ButtonNew">
  30. </Button>
  31. <Button Content="Rename" Margin="10,0,0,0" Width="85" Height="30" Style="{StaticResource MiddleButton}" Click="ButtonRename">
  32. </Button>
  33. <Button Content="Delete" Margin="10,0,0,0" Width="85" Height="30" Style="{StaticResource MiddleButton}" Click="ButtonDelete">
  34. </Button>
  35. </StackPanel>
  36. <!--<TextBlock Text="Recipe List" Margin="5" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>-->
  37. </StackPanel>
  38. </Border>
  39. <Border Grid.Row="1" Margin="0,10,13,0" BorderBrush="{DynamicResource Tab_BD}" BorderThickness="0" Background="Transparent">
  40. <TabControl x:Name="Rcptype" VerticalContentAlignment="Stretch"
  41. HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" Padding="0"
  42. SelectedIndex="{Binding ProcessTypeIndexSelection, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0,-10,0,0" >
  43. <TabItem x:Name="root" Header="Root" Visibility="{Binding RecipeSplitDisable}">
  44. <TreeView Name="treeViewRcpList"
  45. VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"
  46. HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" Padding="0"
  47. Margin="0,6" SelectedItemChanged="treeViewRcpList_SelectedItemChanged" MouseRightButtonDown="treeViewRcpList_MouseRightButtonDown" MouseMove="TreeViewRcpList_MouseMove"
  48. FontSize="14" BorderThickness="1" BorderBrush="Black" Canvas.Top="140" Canvas.Left="4" Opacity="1" Background="LightSteelBlue" PreviewMouseDown="TreeViewRcpList_MouseDown" AllowDrop="True"
  49. DragEnter="TreeViewRcpList_DragEnter" DragOver="TreeViewRcpList_DragEnter" DragLeave="TreeViewRcpList_DragEnter" Drop="TreeViewRcpList_Drop">
  50. <TreeView.ItemContainerStyle>
  51. <Style TargetType="{x:Type TreeViewItem}">
  52. <EventSetter Event="TreeViewItem.PreviewMouseRightButtonDown" Handler="TreeViewItem_MouseRightButtonDown" />
  53. </Style>
  54. </TreeView.ItemContainerStyle>
  55. </TreeView>
  56. </TabItem>
  57. <TabItem x:Name="process" Header="Process" Visibility="{Binding RecipeSplitEnable}">
  58. <TreeView Name="treeViewProcessRcpList"
  59. VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"
  60. HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" Padding="0"
  61. Margin="0,6" SelectedItemChanged="treeViewRcpList_SelectedItemChanged" MouseRightButtonDown="treeViewRcpList_MouseRightButtonDown" MouseMove="TreeViewRcpList_MouseMove"
  62. FontSize="14" BorderThickness="1" BorderBrush="Black" Canvas.Top="140" Canvas.Left="4" Opacity="1" Background="LightSteelBlue" PreviewMouseDown="TreeViewRcpList_MouseDown" AllowDrop="True"
  63. DragEnter="TreeViewRcpList_DragEnter" DragOver="TreeViewRcpList_DragEnter" DragLeave="TreeViewRcpList_DragEnter" Drop="TreeViewRcpList_Drop">
  64. <TreeView.ItemContainerStyle>
  65. <Style TargetType="{x:Type TreeViewItem}">
  66. <EventSetter Event="TreeViewItem.PreviewMouseRightButtonDown" Handler="TreeViewItem_MouseRightButtonDown" />
  67. </Style>
  68. </TreeView.ItemContainerStyle>
  69. </TreeView>
  70. </TabItem>
  71. <TabItem x:Name="Clean" Header="Clean" Visibility="{Binding RecipeSplitEnable}">
  72. <TreeView Name="treeViewCleanRcpList" Margin="0,6"
  73. VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"
  74. HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" Padding="0"
  75. SelectedItemChanged="treeViewRcpList_SelectedItemChanged" MouseRightButtonDown="treeViewRcpList_MouseRightButtonDown" MouseMove="TreeViewRcpList_MouseMove"
  76. FontSize="14" BorderThickness="1" BorderBrush="Black" Canvas.Top="140" Canvas.Left="4" Opacity="1" Background="LightSteelBlue" PreviewMouseDown="TreeViewRcpList_MouseDown" AllowDrop="True"
  77. DragEnter="TreeViewRcpList_DragEnter" DragOver="TreeViewRcpList_DragEnter" DragLeave="TreeViewRcpList_DragEnter" Drop="TreeViewRcpList_Drop">
  78. <TreeView.ItemContainerStyle>
  79. <Style TargetType="{x:Type TreeViewItem}">
  80. <EventSetter Event="TreeViewItem.PreviewMouseRightButtonDown" Handler="TreeViewItem_MouseRightButtonDown" />
  81. </Style>
  82. </TreeView.ItemContainerStyle>
  83. </TreeView>
  84. </TabItem>
  85. </TabControl>
  86. </Border>
  87. <!--Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  88. </Border>-->
  89. </Grid>
  90. <GridSplitter Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" />
  91. <Grid x:Name="gridDisplay" Grid.Column="2">
  92. <Grid.RowDefinitions>
  93. <RowDefinition Height="40" />
  94. <RowDefinition Height="706*" />
  95. </Grid.RowDefinitions>
  96. <StackPanel Grid.Row="0" Orientation="Horizontal">
  97. <Label Content="{DynamicResource GlobalLableCurrentRecipe}" FontSize="15" Height="31" HorizontalAlignment="Left" HorizontalContentAlignment="Center" Margin="5,3,0,0" Name="label2" VerticalAlignment="Top" FontWeight="Normal" />
  98. <Label Height="31" Margin="22,3,0,0" Name="labelSelectedRecipe" VerticalAlignment="Top" Content="{Binding Path=CurrentRecipeName}" FontSize="15" HorizontalContentAlignment="Left" HorizontalAlignment="Left" FontWeight="Normal" />
  99. <Button Style="{StaticResource MiddleButton}" Height="25" Click="buttonCodeReload_Click" Name="buttonReloadTableRecipe" VerticalAlignment="Top" FontSize="16" Width="80" VerticalContentAlignment="Center" Margin="50,4,0,0" HorizontalAlignment="Right" Content="{DynamicResource GlobalLableButtonReload}" FontWeight="Normal"></Button>
  100. <Button Style="{StaticResource MiddleButton}" Height="25" Name="buttonSaveTableRecipe" FontSize="16" Width="80" VerticalContentAlignment="Center" Click="SaveToSingle_Click" Margin="30,4,22,0" HorizontalAlignment="Right" VerticalAlignment="Top" Content="{DynamicResource GlobalLableButtonSave}" FontWeight="Normal">
  101. <Button.ContextMenu>
  102. <ContextMenu Name="SetMenu" >
  103. <MenuItem Name="SaveToSingle" Click="SaveToSingle_Click"/>
  104. <!--<MenuItem Name="SaveToDouble" Click="SaveToDouble_Click" />-->
  105. </ContextMenu>
  106. </Button.ContextMenu>
  107. </Button>
  108. </StackPanel>
  109. <Grid Grid.Row="1">
  110. <core:RecipeEditorControl x:Name="tableRecipeGrid" FontSize="12" BorderThickness="1" BorderBrush="Black" Margin="0,0,0,6" />
  111. </Grid>
  112. </Grid>
  113. </Grid>
  114. </UserControl>