MainWindow.xaml 7.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. Title="MainWindow" Height="720" Width="1000" MinWidth="1000" MinHeight="720" Closing="Window_Closing" WindowStartupLocation="CenterScreen" Icon="/FromImage/mmexport1752891278116.jpg" Loaded="Window_Loaded">
  9. <Grid Background="#B2E0E0E0">
  10. <Grid VerticalAlignment="Top" Height="60" Background="#FF1200D1" Grid.ColumnSpan="2">
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition Width="60"/>
  13. <ColumnDefinition Width="*"/>
  14. <ColumnDefinition Width="60"/>
  15. <ColumnDefinition Width="60"/>
  16. </Grid.ColumnDefinitions>
  17. <Button x:Name="MenuBtn" Grid.Column="0" HorizontalAlignment="Left" Height="60" Width="60" Click="MenuBtn_Click" Background="{x:Null}">
  18. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  19. <Image Source="/FromImage/菜单_白.png" Width="34" Height="34" />
  20. <TextBlock Text="菜单" FontSize="10" FontWeight="Bold" Margin="0,2,0,0" HorizontalAlignment="Center" Foreground="White" />
  21. </StackPanel>
  22. </Button>
  23. <StackPanel Grid.Column="1" x:Name="HeardPanel" Orientation="Horizontal">
  24. <Button x:Name="ExitBtn" HorizontalAlignment="Left" Height="60" Width="60" Click="ExitBtn_Click" Background="{x:Null}">
  25. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  26. <Image Source="/FromImage/退出_白.png" Width="28" Height="28" />
  27. <TextBlock Text="系统退出" FontSize="10" FontWeight="Bold" Margin="0,8,0,0" HorizontalAlignment="Center" Foreground="White" />
  28. </StackPanel>
  29. </Button>
  30. <Button x:Name="MainPageBtn" HorizontalAlignment="Left" Height="60" Width="60" Background="{x:Null}" Click="MainPageBtn_Click">
  31. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  32. <Image Source="/FromImage/相机小_白.png" Width="32" Height="32" />
  33. <TextBlock Text="主界面" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" />
  34. </StackPanel>
  35. </Button>
  36. <Button x:Name="HistoryDataBtn" HorizontalAlignment="Left" Height="60" Width="60" Background="{x:Null}" Click="HistoryDataBtn_Click">
  37. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  38. <Image Source="/FromImage/数据_白.png" Width="32" Height="32" />
  39. <TextBlock Text="历史数据" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" />
  40. </StackPanel>
  41. </Button>
  42. <Button x:Name="SettingBtn" HorizontalAlignment="Left" Height="60" Width="60" Background="{x:Null}" Click="SettingBtn_Click">
  43. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  44. <Image Source="/FromImage/设置_白.png" Width="32" Height="32" />
  45. <TextBlock Text="设置界面" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" />
  46. </StackPanel>
  47. </Button>
  48. <Button x:Name="PlcSettingBtn" HorizontalAlignment="Left" Height="60" Width="60" Background="{x:Null}" Click="PlcSettingBtn_Click">
  49. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  50. <Image Source="/FromImage/PLC信息管理_白.png" Width="32" Height="32" />
  51. <TextBlock Text="PLC设置" FontSize="10" FontWeight="Bold" Margin="0,5,0,0" HorizontalAlignment="Center" Foreground="White" />
  52. </StackPanel>
  53. </Button>
  54. <Button x:Name="ErrorMessageShowBtn" HorizontalAlignment="Left" Height="60" Width="60" Background="{x:Null}" Click="ErrorMessageShowBtn_Click">
  55. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  56. <Image Source="/FromImage/故障_白.png" Width="36" Height="36" />
  57. <TextBlock Text="故障页面" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" Foreground="White" />
  58. </StackPanel>
  59. </Button>
  60. <Button x:Name="UserMessageBtn" HorizontalAlignment="Left" Height="60" Width="60" Background="{x:Null}" Click="UserMessageBtn_Click">
  61. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  62. <Image Source="/FromImage/用户管理_白.png" Width="32" Height="32" />
  63. <TextBlock Text="用户管理" FontSize="10" FontWeight="Bold" Margin="0,4,0,0" HorizontalAlignment="Center" Foreground="White" />
  64. </StackPanel>
  65. </Button>
  66. </StackPanel>
  67. <Button Grid.Column="2" x:Name="KeyBoardBtn" Height="60" Background="{x:Null}" Click="KeyBoardBtn_Click">
  68. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  69. <Image Source="/FromImage/键盘_白.png" Width="40" Height="40" />
  70. <TextBlock Text="键盘" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" Foreground="White" />
  71. </StackPanel>
  72. </Button>
  73. <Image Grid.Column="3" x:Name="LogoImage" Source="/FromImage/mmexport1752891278116.jpg" Margin="0,0,0,0" Height="60" Width="60" HorizontalAlignment="Right" />
  74. </Grid>
  75. <Frame x:Name="ShowFrame" Margin="0,60,0,55" NavigationUIVisibility="Hidden" Grid.ColumnSpan="2"/>
  76. <Grid VerticalAlignment="Bottom" Height="40" Margin="0,0,0,5" Grid.ColumnSpan="2">
  77. <Border
  78. Background="#FF1200D1"
  79. CornerRadius="8"
  80. BorderBrush="Gray"
  81. BorderThickness="1"
  82. Margin="10,0,10,0" VerticalAlignment="Bottom" Height="40">
  83. <StackPanel Orientation="Horizontal">
  84. <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>
  85. <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>
  86. </StackPanel>
  87. </Border>
  88. <Label x:Name="ErrMessageLab" Content="{Binding ShowErrMessage}" HorizontalAlignment="Right" Foreground="Red" Width="400" Height="30" Margin="0,0,30,0" />
  89. </Grid>
  90. </Grid>
  91. </Window>