MainWindow.xaml 7.3 KB

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