FestoView.xaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <UserControl x:Class="CyberX8_Simulator.Views.FestoView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:CyberX8_Simulator.Views"
  7. xmlns:commons="clr-namespace:MECF.Framework.Simulator.Core.Commons;assembly=MECF.Framework.Simulator.Core"
  8. mc:Ignorable="d"
  9. d:Height="900" d:Width="1200">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="100"></RowDefinition>
  13. <RowDefinition Height="50"></RowDefinition>
  14. <RowDefinition />
  15. <RowDefinition Height="10"></RowDefinition>
  16. </Grid.RowDefinitions>
  17. <commons:SocketTitleView Grid.Row="0"></commons:SocketTitleView>
  18. <Grid Grid.Row="1">
  19. <StackPanel Orientation="Horizontal" Width="1200">
  20. <Button Content="Clear Log" Width="100" Height="35" Command="{Binding ClearLogCommand}"></Button>
  21. <StackPanel Orientation="Horizontal" Width="500" Height="50" Margin="100,0,0,0">
  22. <Label Content="DO:" VerticalAlignment="Center"></Label>
  23. <ComboBox Width="250" Height="30" VerticalContentAlignment="Center" ItemsSource="{Binding DONameItems}" SelectedItem="{Binding DOSelectedItem}" />
  24. <ComboBox Width="60" Height="30" Margin="5,0,0,0" VerticalContentAlignment="Center" ItemsSource="{Binding DigitalOutputSelected}" SelectedItem="{Binding DOInputValue}" HorizontalContentAlignment="Center"></ComboBox>
  25. <Button Content="DOInput" Height="30" Width="100" Margin="5,10,0,0" Command="{Binding SetDOCommand}"/>
  26. </StackPanel>
  27. </StackPanel>
  28. </Grid>
  29. <DataGrid Grid.Row="2" FontSize="16" AutoGenerateColumns="False" CanUserAddRows="False" CanUserResizeRows="False" CanUserSortColumns="False"
  30. ItemsSource="{Binding TransactionLogItems}"
  31. Width="1200" VerticalAlignment="Top" MaxHeight="780">
  32. <DataGrid.Columns>
  33. <DataGridTextColumn Header="Time" Width="200" IsReadOnly="True" Binding="{Binding OccurTime, UpdateSourceTrigger=PropertyChanged}" />
  34. <DataGridTextColumn Header="Incoming" Width="500" IsReadOnly="True" Binding="{Binding Incoming, UpdateSourceTrigger=PropertyChanged}">
  35. <DataGridTextColumn.ElementStyle>
  36. <Style TargetType="TextBlock">
  37. <Setter Property="TextWrapping" Value="Wrap" />
  38. <Setter Property="Height" Value="auto" />
  39. </Style>
  40. </DataGridTextColumn.ElementStyle>
  41. </DataGridTextColumn>
  42. <DataGridTextColumn Header="Outgoing" Width="500" IsReadOnly="True" Binding="{Binding Outgoing, UpdateSourceTrigger=PropertyChanged}">
  43. <DataGridTextColumn.ElementStyle>
  44. <Style TargetType="TextBlock">
  45. <Setter Property="TextWrapping" Value="Wrap" />
  46. <Setter Property="Height" Value="auto" />
  47. </Style>
  48. </DataGridTextColumn.ElementStyle>
  49. </DataGridTextColumn>
  50. </DataGrid.Columns>
  51. </DataGrid>
  52. </Grid>
  53. </UserControl>