RecipeVPItemSelectView.xaml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <UserControl x:Class="FurnaceUI.Views.Editors.RecipeVPItemSelectView"
  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. xmlns:local="clr-namespace:FurnaceUI.Views.Editors" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:cal="http://www.caliburn.org" xmlns:converter="clr-namespace:FurnaceUI.Converter" xmlns:converter1="clr-namespace:MECF.Framework.UI.Client.Ctrlib.Converter;assembly=MECF.Framework.UI.Client"
  7. mc:Ignorable="d"
  8. Height="700" Width="940" FontFamily="Segoe" Background="White">
  9. <UserControl.Resources>
  10. <converter:IsCheckShowStringConverter x:Key="isCheckShowStringConverter"/>
  11. <converter1:BoolReverseConverter x:Key="boolReverseConverter"/>
  12. </UserControl.Resources>
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="*"/>
  16. <RowDefinition Height="80"/>
  17. </Grid.RowDefinitions>
  18. <Grid.ColumnDefinitions>
  19. <ColumnDefinition Width="250"/>
  20. <ColumnDefinition/>
  21. </Grid.ColumnDefinitions>
  22. <DockPanel>
  23. <Canvas/>
  24. </DockPanel>
  25. <Grid Margin="10">
  26. <Grid.RowDefinitions>
  27. <RowDefinition Height="60"/>
  28. <RowDefinition Height="*"/>
  29. </Grid.RowDefinitions>
  30. <TextBlock Style="{StaticResource TextBlock_Title}" Text="Item Group" VerticalAlignment="Center"/>
  31. <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="1">
  32. <ListBox ItemsSource="{Binding ItemGroup}" >
  33. <ListBox.ItemsPanel>
  34. <ItemsPanelTemplate>
  35. <StackPanel Margin="10,0,10,10"></StackPanel>
  36. </ItemsPanelTemplate>
  37. </ListBox.ItemsPanel>
  38. <ListBox.ItemTemplate>
  39. <DataTemplate>
  40. <ContentControl Width="200">
  41. <Border BorderBrush="Gray" BorderThickness="1,0,1,1">
  42. <RadioButton Content="{Binding}" Style="{StaticResource NormalRadioButton}" GroupName="PressureSetpoint" FontSize="20" Margin="4,0,4,4">
  43. <i:Interaction.Triggers>
  44. <i:EventTrigger EventName="Checked">
  45. <cal:ActionMessage MethodName="ItemChecked">
  46. <cal:Parameter Value="{Binding}"></cal:Parameter>
  47. </cal:ActionMessage>
  48. </i:EventTrigger>
  49. </i:Interaction.Triggers>
  50. </RadioButton>
  51. </Border>
  52. </ContentControl>
  53. </DataTemplate>
  54. </ListBox.ItemTemplate>
  55. </ListBox>
  56. </Border>
  57. </Grid>
  58. <Grid Grid.Column="1">
  59. <Grid.RowDefinitions>
  60. <RowDefinition Height="80"/>
  61. <RowDefinition/>
  62. </Grid.RowDefinitions>
  63. <Border BorderBrush="Gray" BorderThickness="1" Margin="10">
  64. <StackPanel Orientation="Horizontal">
  65. <TextBlock Text="Selected Group:" FontSize="14" VerticalAlignment="Center"/>
  66. <TextBox Text="{Binding SelectedGroup}" IsEnabled="False" Width="200" Margin="4"/>
  67. <TextBlock Text="Selected Item:" FontSize="14" VerticalAlignment="Center"/>
  68. <TextBox Text="{Binding SelectedItem}" IsEnabled="False" Width="200" Margin="4"/>
  69. </StackPanel>
  70. </Border>
  71. <ListBox Grid.Row="1" ItemsSource="{Binding SelectedItemList}" Margin="10">
  72. <ListBox.ItemsPanel>
  73. <ItemsPanelTemplate>
  74. <UniformGrid Margin="10,0,10,10" Columns="3"></UniformGrid>
  75. </ItemsPanelTemplate>
  76. </ListBox.ItemsPanel>
  77. <ListBox.ItemTemplate>
  78. <DataTemplate>
  79. <ContentControl Width="200">
  80. <Border BorderBrush="Gray" BorderThickness="1,1,1,1">
  81. <Grid>
  82. <Grid.ColumnDefinitions>
  83. <ColumnDefinition Width="25"/>
  84. <ColumnDefinition Width="*"/>
  85. </Grid.ColumnDefinitions>
  86. <TextBlock Grid.Column="0" Text="{Binding No}" VerticalAlignment="Center" Margin="4" />
  87. <RadioButton Grid.Column="1" Content="{Binding Name}" GroupName="PressureSetpoint" FontSize="20" Margin="0,0,4,4" IsEnabled="{ Binding IsCheck, Converter={StaticResource boolReverseConverter}}">
  88. <i:Interaction.Triggers>
  89. <i:EventTrigger EventName="Checked">
  90. <cal:ActionMessage MethodName="SubItemChecked">
  91. <cal:Parameter Value="{Binding Name}"></cal:Parameter>
  92. </cal:ActionMessage>
  93. </i:EventTrigger>
  94. </i:Interaction.Triggers>
  95. </RadioButton>
  96. </Grid>
  97. </Border>
  98. </ContentControl>
  99. </DataTemplate>
  100. </ListBox.ItemTemplate>
  101. </ListBox>
  102. </Grid>
  103. <Border Grid.Row="2" Grid.ColumnSpan="2">
  104. <Grid>
  105. <Canvas>
  106. <Button Width="130" Height="45" Content="Clear" Style="{StaticResource CommandButton}" Canvas.Left="34" Canvas.Top="19"></Button>
  107. <Button Content="Save" Canvas.Left="406" Canvas.Top="19" Width="130" Height="45" Style="{StaticResource CommandButton}" IsEnabled="{Binding IsEnable}">
  108. <i:Interaction.Triggers>
  109. <i:EventTrigger EventName="Click">
  110. <cal:ActionMessage MethodName="TempSetSave">
  111. </cal:ActionMessage>
  112. </i:EventTrigger>
  113. </i:Interaction.Triggers>
  114. </Button>
  115. <Button Content="Close" Canvas.Left="556" Canvas.Top="19" Width="130" Height="45" Style="{StaticResource CommandButton}">
  116. <i:Interaction.Triggers>
  117. <i:EventTrigger EventName="Click">
  118. <cal:ActionMessage MethodName="TempSetCancel">
  119. </cal:ActionMessage>
  120. </i:EventTrigger>
  121. </i:Interaction.Triggers>
  122. </Button>
  123. </Canvas>
  124. </Grid>
  125. </Border>
  126. </Grid>
  127. </UserControl>