MainWindow.xaml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <Window x:Class="CCDCountWpf.MainWindow"
  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:CCDCountWpf"
  7. mc:Ignorable="d"
  8. Stylus.IsPressAndHoldEnabled="False"
  9. Stylus.IsFlicksEnabled="False"
  10. Title="MainWindow" Height="900" Width="1500" MinWidth="1000" MinHeight="720" Closing="Window_Closing" WindowStartupLocation="CenterScreen" Icon="/FromImage/mmexport1752891278116.jpg" Loaded="Window_Loaded"
  11. RenderOptions.BitmapScalingMode="LowQuality" RenderOptions.EdgeMode="Unspecified" TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="Auto">
  12. <Grid Style="{StaticResource MianBackGround}">
  13. <Grid VerticalAlignment="Top" Height="80" Background="#FF2980B9" Grid.ColumnSpan="2">
  14. <Grid.ColumnDefinitions>
  15. <ColumnDefinition Width="80"/>
  16. <ColumnDefinition Width="*"/>
  17. <ColumnDefinition Width="80"/>
  18. <ColumnDefinition Width="80"/>
  19. <ColumnDefinition Width="80"/>
  20. </Grid.ColumnDefinitions>
  21. <Button x:Name="MenuBtn" Grid.Column="0" Click="MenuBtn_Click" Background="{x:Null}">
  22. <StackPanel Orientation="Vertical" VerticalAlignment="Top">
  23. <Image Source="/FromImage/菜单_白.png" Width="45" Height="45" />
  24. <TextBlock Text="{DynamicResource menu}" FontSize="10" FontWeight="Bold" Margin="0,2,0,0" HorizontalAlignment="Center" Foreground="White" />
  25. </StackPanel>
  26. </Button>
  27. <StackPanel Grid.Column="1" x:Name="HeardPanel" Orientation="Horizontal">
  28. <Button x:Name="MainPageBtn" Width="80" Background="{x:Null}" Click="MainPageBtn_Click" TouchDown="MainPageBtn_TouchDown">
  29. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  30. <Image Source="/FromImage/审计信息审计_白.png" Width="40" Height="40" VerticalAlignment="Top" />
  31. <TextBlock Text="{DynamicResource ProductionInterface}" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" TextWrapping="Wrap" />
  32. </StackPanel>
  33. </Button>
  34. <Button x:Name="HistoryDataBtn" Width="80" Background="{x:Null}" Click="HistoryDataBtn_Click" TouchDown="HistoryDataBtn_TouchDown">
  35. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  36. <Image Source="/FromImage/数据_白.png" Width="40" Height="40" />
  37. <TextBlock Text="{DynamicResource HistoricalData}" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" TextWrapping="Wrap" />
  38. </StackPanel>
  39. </Button>
  40. <Button x:Name="SettingBtn" Width="80" Background="{x:Null}" Click="SettingBtn_Click" TouchDown="SettingBtn_TouchDown">
  41. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  42. <Image Source="/FromImage/相机小_白.png" Width="40" Height="40" />
  43. <TextBlock Text="{DynamicResource CameraSettings}" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" TextWrapping="Wrap" />
  44. </StackPanel>
  45. </Button>
  46. <Button x:Name="PlcSettingBtn" Width="80" Background="{x:Null}" Click="PlcSettingBtn_Click" TouchDown="PlcSettingBtn_TouchDown">
  47. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  48. <Image Source="/FromImage/PLC信息管理_白.png" Width="40" Height="40" />
  49. <TextBlock Text="{DynamicResource ParameterSettings}" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" TextWrapping="Wrap" />
  50. </StackPanel>
  51. </Button>
  52. <!--<Button x:Name="PlcOperationBtn" Width="80" Background="{x:Null}" Click="PlcOperationBtn_Click">
  53. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  54. <Image Source="/FromImage/操作_白.png" Width="40" Height="40" />
  55. <TextBlock Text="{DynamicResource OperationTest}" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" Foreground="White" Padding="0,5,0,0" TextWrapping="Wrap" />
  56. </StackPanel>
  57. </Button>-->
  58. <Button x:Name="ErrorMessageShowBtn" Width="80" Background="{x:Null}" Click="ErrorMessageShowBtn_Click" TouchDown="ErrorMessageShowBtn_TouchDown">
  59. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  60. <Image Source="/FromImage/故障_白.png" Width="40" Height="40" />
  61. <TextBlock Text="{DynamicResource ErrorPage}" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" />
  62. </StackPanel>
  63. </Button>
  64. <Button x:Name="AuditTrailShowBtn" Width="80" Background="{x:Null}" Click="AuditTrailShowBtn_Click" TouchDown="AuditTrailShowBtn_TouchDown">
  65. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  66. <Image Source="/FromImage/审计信息审计_白.png" Width="40" Height="40" />
  67. <TextBlock Text="{DynamicResource AuditTrail}" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" TextWrapping="Wrap" />
  68. </StackPanel>
  69. </Button>
  70. <Button x:Name="UserMessageBtn" Width="80" Background="{x:Null}" Click="UserMessageBtn_Click" TouchDown="UserMessageBtn_TouchDown">
  71. <StackPanel Orientation="Vertical">
  72. <Image Source="/FromImage/用户管理_白.png" Width="40" Height="40" />
  73. <TextBlock Text="{DynamicResource UserManagement}" FontSize="10" FontWeight="Bold" Margin="0,4,0,0" HorizontalAlignment="Center" Foreground="White" TextWrapping="Wrap" />
  74. </StackPanel>
  75. </Button>
  76. <Button x:Name="ExitBtn" Width="80" Click="ExitBtn_Click" Background="{x:Null}">
  77. <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left">
  78. <Image Source="/FromImage/退出_白.png" Width="38" Height="38" VerticalAlignment="Top" />
  79. <TextBlock Text="{DynamicResource SystemExit}" FontSize="10" FontWeight="Bold" Margin="0,8,0,0" HorizontalAlignment="Center" Foreground="White" TextWrapping="Wrap" />
  80. </StackPanel>
  81. </Button>
  82. </StackPanel>
  83. <Button Grid.Column="2" x:Name="SwitchLanguageBtn" Background="{x:Null}" Click="SwitchLanguageBtn_Click">
  84. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  85. <Image Source="/FromImage/语言_白.png" Width="35" Height="35" Margin="0,2,0,0" />
  86. <TextBlock Text="{DynamicResource SwitchLanguageText}" FontSize="10" FontWeight="Bold" Margin="0,3,0,0" HorizontalAlignment="Center" Foreground="White" />
  87. </StackPanel>
  88. </Button>
  89. <Button Grid.Column="3" x:Name="KeyBoardBtn" Background="{x:Null}" Click="KeyBoardBtn_Click">
  90. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  91. <Image Source="/FromImage/键盘_白.png" Width="40" Height="40" />
  92. <TextBlock Text="{DynamicResource Keyboard}" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" Foreground="White" />
  93. </StackPanel>
  94. </Button>
  95. <Image Grid.Column="4" x:Name="LogoImage" Source="/FromImage/mmexport1752891278116.jpg" Margin="0,0,0,0" Width="80" HorizontalAlignment="Right" />
  96. </Grid>
  97. <Frame x:Name="ShowFrame" Margin="0,80,0,55" NavigationUIVisibility="Hidden" Grid.ColumnSpan="2"/>
  98. <Grid VerticalAlignment="Bottom" Height="40" Margin="0,0,0,5" Grid.ColumnSpan="2">
  99. <Border
  100. Background="#FF2980B9"
  101. CornerRadius="8"
  102. BorderBrush="Gray"
  103. BorderThickness="1"
  104. Margin="10,0,10,0" VerticalAlignment="Bottom" Height="40">
  105. <StackPanel Orientation="Horizontal">
  106. <Label x:Name="CPUMonitorLab" Content="{Binding CPUMonitor}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Margin="30,8,0,0" Width="80" FontSize="10" FontWeight="Bold" Foreground="White"></Label>
  107. <Label x:Name="RamMonitorLab" Content="{Binding RamMonitor}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Margin="20,8,0,0" Width="120" FontSize="10" FontWeight="Bold" Foreground="White"></Label>
  108. </StackPanel>
  109. </Border>
  110. </Grid>
  111. </Grid>
  112. </Window>