StockerSensorView.xaml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <UserControl x:Class="FurnaceUI.Views.Maintenances.StockerSensorView"
  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:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
  7. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  8. xmlns:cal="http://www.caliburn.org"
  9. xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
  10. xmlns:local="clr-namespace:FurnaceUI.Views.Maintenances"
  11. mc:Ignorable="d"
  12. d:DesignHeight="600" d:DesignWidth="640" x:Name="self">
  13. <UserControl.Resources>
  14. <DataTemplate x:Key="IndexTemplate">
  15. <Label Content="{Binding Index}" Width="30" Height="36" VerticalAlignment="Center" HorizontalAlignment="Left"></Label>
  16. </DataTemplate>
  17. <DataTemplate x:Key="NameTemplate">
  18. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,0">
  19. <Label Content="{Binding DisplayName}" Width="350" Height="36" VerticalAlignment="Center" HorizontalAlignment="Left"></Label>
  20. </Border>
  21. </DataTemplate>
  22. <DataTemplate x:Key="ValueTemplate">
  23. <deviceControl:AITSensor LightOnValue="{Binding Value}" GreenColor="True" Width="100" Height="36" VerticalAlignment="Center" HorizontalAlignment="Center">
  24. </deviceControl:AITSensor>
  25. </DataTemplate>
  26. </UserControl.Resources>
  27. <Grid Margin="10,0,10,0">
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="Auto"/>
  30. <RowDefinition Height="50"/>
  31. </Grid.RowDefinitions>
  32. <Grid.ColumnDefinitions>
  33. <ColumnDefinition Width="200"/>
  34. <ColumnDefinition Width="75"/>
  35. <ColumnDefinition Width="*"/>
  36. </Grid.ColumnDefinitions>
  37. <GroupBox Grid.Row="0" Grid.ColumnSpan="3">
  38. <ListView ItemsSource="{Binding StockerSensors}" MaxHeight="320">
  39. <ListView.View>
  40. <GridView>
  41. <GridViewColumn Header="Index" CellTemplate="{StaticResource ResourceKey=IndexTemplate}"></GridViewColumn>
  42. <GridViewColumn Header="Name" CellTemplate="{StaticResource ResourceKey=NameTemplate}"></GridViewColumn>
  43. <GridViewColumn Header="Value" CellTemplate="{StaticResource ResourceKey=ValueTemplate}"></GridViewColumn>
  44. </GridView>
  45. </ListView.View>
  46. </ListView>
  47. </GroupBox>
  48. <DockPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,0,0">
  49. <Border>
  50. <Button Content="Close" Style="{StaticResource CommandButton}" Margin="0,0,20,0" Width="120" Height="40">
  51. <i:Interaction.Triggers>
  52. <i:EventTrigger EventName="Click">
  53. <cal:ActionMessage MethodName="ClosedCmd">
  54. </cal:ActionMessage>
  55. </i:EventTrigger>
  56. </i:Interaction.Triggers>
  57. </Button>
  58. </Border>
  59. </DockPanel>
  60. </Grid>
  61. </UserControl>