TopView.xaml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <UserControl x:Class="Aitex.Triton160.UI.Views.TopView"
  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:coreControl="clr-namespace:Aitex.Core.UI.Control;assembly=Core"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=Core"
  8. mc:Ignorable="d"
  9. Background="{StaticResource mainBackgroundColor}"
  10. Height="130" Width="1920" >
  11. <Grid x:Name="gridAll">
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="*" />
  14. <ColumnDefinition Width="70" />
  15. </Grid.ColumnDefinitions>
  16. <Grid Grid.Column="0" >
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="3*" />
  19. <RowDefinition Height="2*" />
  20. <RowDefinition Height="50" />
  21. </Grid.RowDefinitions>
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="215" />
  24. <ColumnDefinition Width="*" />
  25. <ColumnDefinition Width="300" />
  26. </Grid.ColumnDefinitions>
  27. <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Source="{Binding LogoSource}" HorizontalAlignment="Left"></Image>
  28. <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" x:Name="txtTitle" Margin="0,10,0,0" FontSize="27" Style="{StaticResource MainTextBlock}" HorizontalAlignment="Center"/>
  29. <!--<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
  30. <TextBlock Text="{DynamicResource GlobalLableSystemStatus}" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  31. <TextBlock Text="{Binding SystemStatus}" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  32. </StackPanel>-->
  33. <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
  34. <TextBlock Text="{DynamicResource GlobalLableContactor}" Style="{StaticResource MainTextBlock}" Padding="5,0,10,0"/>
  35. <Ellipse HorizontalAlignment="Left" Stroke="Gray" StrokeThickness="2" Width="15" Height="15"
  36. Fill="{Binding MainContactorColor, Mode=OneWay}" Style="{x:Null}"/>
  37. <TextBlock Text="{DynamicResource GlobalLableEmo}" Style="{StaticResource MainTextBlock}" Padding="15,0, 10, 0"/>
  38. <Ellipse HorizontalAlignment="Left" Stroke="Gray" StrokeThickness="2" Width="15" Height="15"
  39. Fill="{Binding EmoStopColor, Mode=OneWay}" Style="{x:Null}"/>
  40. <TextBlock Text="{DynamicResource GlobalLableSystemStatus}" Style="{StaticResource MainTextBlock}" Padding="25,0, 5, 0" />
  41. <Border BorderThickness="1" BorderBrush="DarkGray" Padding="5,2" Width="120" Background="{Binding SystemStatusBackground}">
  42. <TextBlock Text="{Binding SystemStatus}" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  43. </Border>
  44. <StackPanel Visibility="{Binding IsHostStatusVisibility}" Margin="10,0" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
  45. <TextBlock Text="{DynamicResource GlobalLableHostStatus}" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  46. <Border BorderThickness="1" BorderBrush="DarkGray" Width="250" Padding="5,2" Background="{Binding HostStatusBackground}">
  47. <TextBlock Text="{Binding HostCommunicationStatus}" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  48. </Border>
  49. <Border BorderThickness="1" BorderBrush="DarkGray" Width="200" Padding="5,2" Margin="10,0" Background="{Binding HostControlStatusBackground}">
  50. <TextBlock Text="{Binding HostControlStatus}" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  51. </Border>
  52. </StackPanel>
  53. </StackPanel>
  54. <StackPanel Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal" Background="{Binding TopViewBackground}">
  55. <TextBlock Text="{DynamicResource GlobalLableVersion}" Style="{StaticResource MainTextBlock}" FontSize="11" Padding="5,0" />
  56. <TextBlock Text="{Binding SoftwareVersion}" Style="{StaticResource MainTextBlock}" FontSize="11" Padding="5,0" />
  57. </StackPanel>
  58. <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Right" >
  59. <Button Width="70" Height="25" FontSize="15" Foreground="White" Padding="0" Margin="3,3" VerticalAlignment="Center" Content="EN" Command="{Binding SwitchLanguageCommand}" CommandParameter="EN" IsEnabled="{Binding EnableEnButton}" />
  60. <Button Width="70" Height="25" FontSize="15" Foreground="White" Padding="0" Margin="3,3" VerticalAlignment="Center" HorizontalAlignment="Right" Content="中文" Command="{Binding SwitchLanguageCommand}" CommandParameter="CN" IsEnabled="{Binding EnableCnButton}"/>
  61. </StackPanel>
  62. <StackPanel Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">
  63. <TextBlock Text="{DynamicResource GlobalLableLogin}" FontSize="15" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  64. <TextBlock Text="{Binding User}" FontSize="15" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  65. <TextBlock Text="{DynamicResource GlobalLableRole}" FontSize="15" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  66. <TextBlock Text="{Binding Role}" FontSize="15" Style="{StaticResource MainTextBlock}" Padding="5,0" />
  67. <Button Width="70" FontSize="15" Height="25" Foreground="White" Padding="0" Margin="3,3" VerticalAlignment="Center" Content="{DynamicResource GlobalLableLogout}" Click="btnLogoff_Click" />
  68. </StackPanel>
  69. <Grid Grid.Row="2" Grid.ColumnSpan="3">
  70. <Grid.Background>
  71. <ImageBrush ImageSource="/Core;component/Resources/Main/下拉框_底板JETP.png"></ImageBrush>
  72. </Grid.Background>
  73. <Grid.ColumnDefinitions>
  74. <ColumnDefinition Width="120" />
  75. <ColumnDefinition Width="*" />
  76. <ColumnDefinition Width="120" />
  77. <ColumnDefinition Width="140" />
  78. </Grid.ColumnDefinitions>
  79. <Label Grid.Column="0" Style="{StaticResource EventLabel}" Content="{DynamicResource GlobalLableEvent}"></Label>
  80. <ComboBox Grid.Column="1" Style="{StaticResource EventComboBox}" x:Name="comboEvent" DropDownClosed="comboEvent_DropDownClosed" Focusable="False" Margin="25,11,49.6,10.6" Width="Auto" />
  81. <Button Grid.Column="2" VerticalAlignment="Center" Style="{StaticResource MainMiddleButton}" x:Name="btnReset" Content="{DynamicResource GlobalLableButtonReset}" Click="btnReset_Click" />
  82. <Button Grid.Column="3" VerticalAlignment="Center" Style="{StaticResource MainMiddleButton}" Width="120" Content="{DynamicResource GlobalLableButtonCloseBuzzer}" Command="{Binding SwitchOffBuzzerCommand}" Margin="3,0,17,0" />
  83. </Grid>
  84. </Grid>
  85. <deviceControl:AITSignalTower Grid.Column="1" x:Name="signalTower" DeviceData="{Binding Path=SignalTower}" Height="105" Width="30" Margin="0,10,20,0" HorizontalAlignment="Right" VerticalAlignment="Top" />
  86. </Grid>
  87. </UserControl>