ParameterCommandView.xaml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <UserControl x:Class="FurnaceUI.Views.Editors.ParameterCommandView"
  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"
  7. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  8. xmlns:cal="http://www.caliburn.org"
  9. mc:Ignorable="d"
  10. Height="740" Width="1000" FontFamily="Segoe" >
  11. <Grid>
  12. <Grid.RowDefinitions>
  13. <RowDefinition Height="*"/>
  14. <RowDefinition Height="0"/>
  15. </Grid.RowDefinitions>
  16. <Grid Grid.Row="0" Grid.Column="0">
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="*"/>
  19. <RowDefinition Height="*"/>
  20. <RowDefinition Height="*"/>
  21. <RowDefinition Height="*"/>
  22. <RowDefinition Height="*"/>
  23. <RowDefinition Height="*"/>
  24. <RowDefinition Height="2*"/>
  25. <RowDefinition Height="*"/>
  26. </Grid.RowDefinitions>
  27. <Grid.ColumnDefinitions>
  28. <ColumnDefinition Width="*"/>
  29. <ColumnDefinition Width="*"/>
  30. </Grid.ColumnDefinitions>
  31. <Border Grid.Row="0" Grid.Column="0" Margin="10" IsEnabled="{Binding IsEnable}">
  32. <RadioButton Width="300" GroupName="RecipeCommand" Content="None">
  33. <i:Interaction.Triggers>
  34. <i:EventTrigger EventName="Checked">
  35. <cal:ActionMessage MethodName="SetCommand">
  36. <cal:Parameter Value="None"/>
  37. </cal:ActionMessage>
  38. </i:EventTrigger>
  39. </i:Interaction.Triggers>
  40. </RadioButton>
  41. </Border>
  42. <Border Grid.Row="1" Grid.Column="0" Margin="10" IsEnabled="{Binding IsEnable}">
  43. <RadioButton Width="300" GroupName="RecipeCommand" Content="Reset">
  44. <i:Interaction.Triggers>
  45. <i:EventTrigger EventName="Checked">
  46. <cal:ActionMessage MethodName="SetCommand">
  47. <cal:Parameter Value="Reset"/>
  48. </cal:ActionMessage>
  49. </i:EventTrigger>
  50. </i:Interaction.Triggers>
  51. </RadioButton>
  52. </Border>
  53. <Border Grid.Row="1" Grid.Column="1" Margin="10" IsEnabled="{Binding IsEnable}">
  54. <RadioButton Width="300" GroupName="RecipeCommand" Content="Jump Step">
  55. <i:Interaction.Triggers>
  56. <i:EventTrigger EventName="Checked">
  57. <cal:ActionMessage MethodName="SetCommand">
  58. <cal:Parameter Value="JumpStep"/>
  59. </cal:ActionMessage>
  60. </i:EventTrigger>
  61. </i:Interaction.Triggers>
  62. </RadioButton>
  63. </Border>
  64. <Border Grid.Row="2" Grid.Column="0" Margin="10" IsEnabled="{Binding IsEnable}">
  65. <RadioButton Width="300" GroupName="RecipeCommand" Content="End">
  66. <i:Interaction.Triggers>
  67. <i:EventTrigger EventName="Checked">
  68. <cal:ActionMessage MethodName="SetCommand">
  69. <cal:Parameter Value="End"/>
  70. </cal:ActionMessage>
  71. </i:EventTrigger>
  72. </i:Interaction.Triggers>
  73. </RadioButton>
  74. </Border>
  75. <Border Grid.Row="3" Grid.Column="0" Margin="10" IsEnabled="{Binding IsEnable}">
  76. <RadioButton Width="300" GroupName="RecipeCommand" Content="Hold">
  77. <i:Interaction.Triggers>
  78. <i:EventTrigger EventName="Checked">
  79. <cal:ActionMessage MethodName="SetCommand">
  80. <cal:Parameter Value="Hold"/>
  81. </cal:ActionMessage>
  82. </i:EventTrigger>
  83. </i:Interaction.Triggers>
  84. </RadioButton>
  85. </Border>
  86. <Border Grid.Row="4" Grid.Column="0" Margin="10" IsEnabled="{Binding IsEnable}">
  87. <RadioButton Width="300" GroupName="RecipeCommand" Content="Buzzer">
  88. <i:Interaction.Triggers>
  89. <i:EventTrigger EventName="Checked">
  90. <cal:ActionMessage MethodName="SetCommand">
  91. <cal:Parameter Value="Buzzer"/>
  92. </cal:ActionMessage>
  93. </i:EventTrigger>
  94. </i:Interaction.Triggers>
  95. </RadioButton>
  96. </Border>
  97. <Border Grid.Row="3" Grid.Column="1" Margin="10" IsEnabled="{Binding IsEnable}">
  98. <RadioButton Width="300" GroupName="RecipeCommand" Content="Call Sub Recipe">
  99. <i:Interaction.Triggers>
  100. <i:EventTrigger EventName="Checked">
  101. <cal:ActionMessage MethodName="SetCommand">
  102. <cal:Parameter Value="Call Sub Recipe"/>
  103. </cal:ActionMessage>
  104. </i:EventTrigger>
  105. </i:Interaction.Triggers>
  106. </RadioButton>
  107. </Border>
  108. <Border Grid.Row="5" Margin="10" IsEnabled="{Binding IsEnable}">
  109. <RadioButton Width="300" GroupName="RecipeCommand" Content="Monitor">
  110. <i:Interaction.Triggers>
  111. <i:EventTrigger EventName="Checked">
  112. <cal:ActionMessage MethodName="SetCommand">
  113. <cal:Parameter Value="Monitor"/>
  114. </cal:ActionMessage>
  115. </i:EventTrigger>
  116. </i:Interaction.Triggers>
  117. </RadioButton>
  118. </Border>
  119. <Border Grid.Row="7" Margin="10" IsEnabled="{Binding IsEnable}"/>
  120. <Border Grid.Row="8" Margin="10" IsEnabled="{Binding IsEnable}"/>
  121. <StackPanel Grid.Row="6" Grid.ColumnSpan="2" Margin=" 20,0,20,0">
  122. <TextBlock Text="Attention" FontSize="14"/>
  123. <TextBox Height="131" TextWrapping="Wrap" MinHeight="60" MinLines="2"/>
  124. </StackPanel>
  125. </Grid>
  126. <Canvas>
  127. <Button Width="130" Height="45" Canvas.Left="611" Canvas.Top="670" Content="OK" Style="{StaticResource CommandButton}">
  128. <i:Interaction.Triggers>
  129. <i:EventTrigger EventName="Click">
  130. <cal:ActionMessage MethodName="OKCommand">
  131. </cal:ActionMessage>
  132. </i:EventTrigger>
  133. </i:Interaction.Triggers>
  134. </Button>
  135. <Button Width="130" Height="45" Canvas.Left="770" Canvas.Top="670" Content="Close" Style="{StaticResource CommandButton}">
  136. <i:Interaction.Triggers>
  137. <i:EventTrigger EventName="Click">
  138. <cal:ActionMessage MethodName="CloseCommand">
  139. </cal:ActionMessage>
  140. </i:EventTrigger>
  141. </i:Interaction.Triggers>
  142. </Button>
  143. </Canvas>
  144. </Grid>
  145. </UserControl>