NewRecipeView.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <UserControl x:Class="Venus_MainPages.Views.NewRecipeView"
  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:d="http://schemas.microsoft.com/expression/blend/2008"
  6. mc:Ignorable="d"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  10. xmlns:customeControls="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
  11. xmlns:unity="clr-namespace:Venus_MainPages.Unity"
  12. xmlns:controls="clr-namespace:Aitex.Core.UI.View.Common;assembly=MECF.Framework.UI.Core"
  13. d:DesignHeight="450" d:DesignWidth="1200" Name="recipeView">
  14. <UserControl.Resources>
  15. <Style TargetType="{x:Type CheckBox}">
  16. <Setter Property="Background" Value="White" />
  17. <Setter Property="BorderBrush" Value="#FF262E34"/>
  18. <Setter Property="Foreground" Value="#FF262E34"/>
  19. <Setter Property="BorderThickness" Value="1"/>
  20. <Setter Property="Template">
  21. <Setter.Value>
  22. <ControlTemplate TargetType="{x:Type CheckBox}">
  23. <Border BorderThickness="0.8" BorderBrush="Gray" Background="White">
  24. <StackPanel Orientation="Horizontal" Name="mainStackPanel" HorizontalAlignment="Center" Background="White" VerticalAlignment="Center">
  25. <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" Width="15" Height="15" HorizontalAlignment="Center">
  26. <!-- your color here -->
  27. <Path Width="15" Height="10" Stroke="PaleVioletRed" StrokeThickness="3" Name="eliCheck" Data="M 2,4 C 2,4 3,5 5,13 C 5,13 5,3 12,0" Visibility="Collapsed"/>
  28. </Border>
  29. <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"></TextBlock>
  30. </StackPanel>
  31. </Border>
  32. <ControlTemplate.Triggers>
  33. <Trigger Property="IsMouseOver" Value="True">
  34. <Setter Property="Background" Value="LightGray" />
  35. </Trigger>
  36. <Trigger Property="IsPressed" Value="True">
  37. <Setter Property="Background" Value="#FF9C9E9F" />
  38. </Trigger>
  39. <Trigger Property="IsEnabled" Value="False">
  40. <Setter Property="Background" Value="LightGray" />
  41. <Setter Property="Foreground" Value="Gray" />
  42. <Setter Property="BorderBrush" Value="Gray"/>
  43. <Setter TargetName="eliCheck" Property="Opacity" Value="0.5" />
  44. <Setter TargetName="mainStackPanel" Property="Background" Value="#DDEBF9"/>
  45. </Trigger>
  46. <Trigger Property="IsChecked" Value="True">
  47. <Setter TargetName="eliCheck" Property="Visibility" Value="Visible"></Setter>
  48. </Trigger>
  49. </ControlTemplate.Triggers>
  50. </ControlTemplate>
  51. </Setter.Value>
  52. </Setter>
  53. </Style>
  54. <Style TargetType="{x:Type controls:TreeViewFileItem}">
  55. <Style.Triggers>
  56. <Trigger Property="IsSelected" Value="True">
  57. <Setter Property="BorderThickness" Value="1"/>
  58. <Setter Property="Opacity" Value="1"/>
  59. <!--<Setter Property="Foreground" Value="{DynamicResource TreeView_BG_Select}"/>-->
  60. <!--<Setter Property="Background" Value="{DynamicResource TreeView_BG_Select}"/>-->
  61. <Setter Property="BorderBrush" Value="#0078D7"/>
  62. </Trigger>
  63. <Trigger Property="IsMouseOver" Value="True">
  64. <Setter Property="Cursor" Value="Hand"/>
  65. <Setter Property="Background" Value="AliceBlue"/>
  66. </Trigger>
  67. <!--<Trigger Property="IsFocused" Value="True">
  68. <Setter Property="Background" Value="LightBlue"/>
  69. </Trigger>-->
  70. </Style.Triggers>
  71. </Style>
  72. </UserControl.Resources>
  73. <i:Interaction.Triggers>
  74. <i:EventTrigger EventName="Loaded">
  75. <i:InvokeCommandAction Command="{Binding LoadedCommand}" CommandParameter="{Binding ElementName=recipeView}"/>
  76. </i:EventTrigger>
  77. <i:EventTrigger EventName="Unloaded">
  78. <i:InvokeCommandAction Command="{Binding UnloadCommand}"/>
  79. </i:EventTrigger>
  80. </i:Interaction.Triggers>
  81. <Grid>
  82. <Grid.ColumnDefinitions>
  83. <ColumnDefinition Width="Auto" />
  84. <ColumnDefinition Width="6" />
  85. <ColumnDefinition Width="800*" />
  86. </Grid.ColumnDefinitions>
  87. <Grid Grid.Column="0">
  88. <Grid.RowDefinitions>
  89. <RowDefinition Height="40"/>
  90. <RowDefinition Height="*"/>
  91. </Grid.RowDefinitions>
  92. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="#076DB6" Padding="5,1">
  93. <TextBlock Text="Recipe List" Margin="5" FontFamily="Arial" FontSize="20" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  94. </Border>
  95. <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  96. <i:Interaction.Triggers>
  97. <i:EventTrigger EventName="MouseDown">
  98. <i:InvokeCommandAction Command="{Binding ClearRecipeCommand}"/>
  99. </i:EventTrigger>
  100. </i:Interaction.Triggers>
  101. <TreeView Name="treeViewRcpList" Margin="0,6" Height="Auto"
  102. FontSize="18" BorderThickness="1" BorderBrush="Black" Canvas.Top="140" Canvas.Left="4" Opacity="1" Background="LightSteelBlue" AllowDrop="True"
  103. >
  104. <i:Interaction.Triggers>
  105. <i:EventTrigger EventName="MouseRightButtonDown">
  106. <i:InvokeCommandAction Command="{Binding MouseRightButtonDownCommand}" CommandParameter="{Binding ElementName=treeViewRcpList}"/>
  107. </i:EventTrigger>
  108. <i:EventTrigger EventName="MouseLeftButtonDown">
  109. <i:InvokeCommandAction Command="{Binding MouseLeftButtonDownCommand}" CommandParameter="{Binding ElementName=treeViewRcpList}"/>
  110. </i:EventTrigger>
  111. </i:Interaction.Triggers>
  112. </TreeView>
  113. </Border>
  114. </Grid>
  115. <GridSplitter Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" />
  116. <Grid x:Name="gridDisplay" Grid.Column="2">
  117. <Grid.RowDefinitions>
  118. <RowDefinition Height="40" />
  119. <RowDefinition Height="706*"/>
  120. </Grid.RowDefinitions>
  121. <StackPanel Grid.Row="0" Orientation="Horizontal">
  122. <!--<customeControls:PathButton PathData="{StaticResource Icon_Save}" Content="Save" DefaultFillBrush="White" Command="{Binding SaveRecipeCommand}" Margin="30,4,22,0" FontSize="16" Height="30" Width="130" VerticalContentAlignment="Center" HorizontalAlignment="Right" VerticalAlignment="Top"/>-->
  123. <customeControls:SplitButton Content="Save" Style="{StaticResource SplitButtonStyle}" Command="{Binding SaveRecipeCommand}" Cursor="Hand" Foreground="White" Margin="30,0,22,0" FontSize="16" Height="30" Width="130" Background="#009ad6">
  124. <MenuItem Header="Save To PMA" Cursor="Hand" Command="{Binding SaveToRecipeCommand}" CommandParameter="0" Visibility="{Binding PMAIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
  125. <MenuItem Header="Save To PMB" Cursor="Hand" Command="{Binding SaveToRecipeCommand}" CommandParameter="1" Visibility="{Binding PMBIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
  126. <MenuItem Header="Save To PMC" Cursor="Hand" Command="{Binding SaveToRecipeCommand}" CommandParameter="2" Visibility="{Binding PMCIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
  127. <MenuItem Header="Save To PMD" Cursor="Hand" Command="{Binding SaveToRecipeCommand}" CommandParameter="3" Visibility="{Binding PMDIsInstalled,Converter={StaticResource bool2VisibilityConverter}}"/>
  128. <MenuItem Header="Save To All" Cursor="Hand" Command="{Binding SaveToRecipeCommand}" CommandParameter="4"/>
  129. </customeControls:SplitButton>
  130. <customeControls:PathButton PathData="{StaticResource Icon_Add}" Content="Add Step" DefaultFillBrush="White" Command="{Binding AddStepCommand}" Margin="30,4,22,0" FontSize="16" Height="30" Width="130" VerticalContentAlignment="Center" HorizontalAlignment="Right" VerticalAlignment="Top"/>
  131. <customeControls:PathButton PathData="{StaticResource Icon_Delete}" Content="Del Step" DefaultFillBrush="White" Command="{Binding DeleteStepCommand}" Margin="30,4,22,0" FontSize="16" Height="30" Width="130" VerticalContentAlignment="Center" HorizontalAlignment="Right" VerticalAlignment="Top"/>
  132. <customeControls:PathButton PathData="{StaticResource Icon_Refresh}" Content="Refresh" DefaultFillBrush="White" Command="{Binding RefreshCommand}" Margin="30,4,22,0" FontSize="16" Height="30" Width="130" VerticalContentAlignment="Center" HorizontalAlignment="Right" VerticalAlignment="Top"/>
  133. <!--<customeControls:PathButton PathData="{StaticResource Icon_Tolerance}" Content="Tolerance" DefaultFillBrush="White" Command="{Binding ToleranceCommand}" Margin="30,4,22,0" FontSize="16" Height="30" Width="130" VerticalContentAlignment="Center" HorizontalAlignment="Right" VerticalAlignment="Top"/>-->
  134. <RadioButton Content="Unfrozen" FontSize="15" Width="120" Height="30" Margin="30,0,10,0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsFrozen,Converter={StaticResource BoolToBool},Mode=TwoWay}"/>
  135. <RadioButton Content="Frozen" FontSize="15" Width="120" Height="30" Margin="0,0,30,0" Style="{StaticResource Button_RadioButton}" IsChecked="{Binding IsFrozen,Mode=TwoWay}"/>
  136. </StackPanel>
  137. <Grid x:Name="grid1" Grid.Row="1" >
  138. <Grid.ColumnDefinitions>
  139. <ColumnDefinition/>
  140. <ColumnDefinition Width="Auto"/>
  141. </Grid.ColumnDefinitions>
  142. <Grid Margin="0,-40,0,0" Grid.Column="1" Grid.Row="1" Background="#C6D2DE" Width="300" x:Name="expandGrid">
  143. <Grid.RowDefinitions>
  144. <RowDefinition Height="30"/>
  145. <RowDefinition Height="Auto"/>
  146. </Grid.RowDefinitions>
  147. <StackPanel Orientation="Horizontal">
  148. <customeControls:PathButton Width="25" Height="25" BorderThickness="0" PathData="{StaticResource Icon_Expand}" Background="Transparent" DefaultFillBrush="Black" Foreground="White" Cursor="Hand" Command="{Binding ExpandCommand}" Margin="5 5 0 0"/>
  149. <TextBlock Text="Recipe Head" FontSize="20" Margin="35 5 0 0"/>
  150. </StackPanel>
  151. <WrapPanel Grid.Row="1" x:Name="headWrapPanel" Orientation="Horizontal" Width="300" Margin="15 5 0 0" />
  152. </Grid>
  153. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
  154. <DockPanel>
  155. <Grid DockPanel.Dock="Left" Name="leftGrid"/>
  156. <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" >
  157. <Grid Name="rightGrid"/>
  158. </ScrollViewer>
  159. </DockPanel>
  160. </ScrollViewer>
  161. </Grid>
  162. </Grid>
  163. </Grid>
  164. </UserControl>