终端一体化运控平台
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

145 líneas
8.7 KiB

  1. <Window x:Class="BPASmartClient.MilkWithTea.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:BPASmartClient.MilkWithTea.View"
  7. xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  8. xmlns:vm ="clr-namespace:BPASmartClient.MilkWithTea.ViewModel"
  9. mc:Ignorable="d"
  10. Title="MainWindow" Height="1000" Width="1600" WindowStyle="None" AllowsTransparency="True" Background="Transparent" WindowStartupLocation="CenterScreen">
  11. <Window.DataContext>
  12. <vm:MainWindowVeiwModel/>
  13. </Window.DataContext>
  14. <Window.Resources>
  15. <Style x:Key="menuButtonTemplate" TargetType="{x:Type Button}">
  16. <Setter Property="Focusable" Value="False"/>
  17. <Setter Property="Background" Value="Transparent"/>
  18. <Setter Property="BorderBrush" Value="Transparent"/>
  19. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  20. <Setter Property="BorderThickness" Value="1"/>
  21. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  22. <Setter Property="VerticalContentAlignment" Value="Center"/>
  23. <Setter Property="Padding" Value="1"/>
  24. <Setter Property="FontSize" Value="20"/>
  25. <Setter Property="Foreground" Value="AliceBlue"/>
  26. <Setter Property="Margin" Value="0,20"/>
  27. <Setter Property="FontFamily" Value="/BPASmartClient.CustomResource;component/Fonts/MT/#iconfont"/>
  28. <Setter Property="Template">
  29. <Setter.Value>
  30. <ControlTemplate TargetType="{x:Type Button}" >
  31. <Border x:Name="border" CornerRadius="10" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  32. <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  33. </Border>
  34. <ControlTemplate.Triggers>
  35. <Trigger Property="IsDefaulted" Value="True">
  36. <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  37. </Trigger>
  38. <Trigger Property="IsMouseOver" Value="True">
  39. <Setter Property="Background" TargetName="border" Value="#63BCFB"/>
  40. <Setter Property="BorderBrush" TargetName="border" Value="#63BCFB"/>
  41. </Trigger>
  42. <Trigger Property="IsPressed" Value="True">
  43. <Setter Property="Background" TargetName="border" Value="#63BCFB"/>
  44. <Setter Property="BorderBrush" TargetName="border" Value="#63BCFB"/>
  45. </Trigger>
  46. <Trigger Property="ToggleButton.IsChecked" Value="True">
  47. <Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
  48. <Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
  49. </Trigger>
  50. <Trigger Property="IsEnabled" Value="False">
  51. <Setter Property="Background" TargetName="border" Value="#FFF4F4F4"/>
  52. <Setter Property="BorderBrush" TargetName="border" Value="#FFADB2B5"/>
  53. <Setter Property="Foreground" Value="#FF838383"/>
  54. </Trigger>
  55. </ControlTemplate.Triggers>
  56. </ControlTemplate>
  57. </Setter.Value>
  58. </Setter>
  59. </Style>
  60. </Window.Resources>
  61. <Border Background="#FF37A0EA" CornerRadius="20" BorderThickness="0">
  62. <Grid Background="Transparent">
  63. <Grid.ColumnDefinitions>
  64. <ColumnDefinition Width="120"/>
  65. <ColumnDefinition Width="*"/>
  66. </Grid.ColumnDefinitions >
  67. <Grid.RowDefinitions >
  68. <RowDefinition Height="67"/>
  69. <RowDefinition />
  70. </Grid.RowDefinitions>
  71. <Grid Grid.RowSpan="3" MouseDown="Grid_MouseDown">
  72. <Grid.RowDefinitions>
  73. <RowDefinition Height="20"/>
  74. <RowDefinition Height="150"/>
  75. <RowDefinition Height="80"/>
  76. <RowDefinition Height="80"/>
  77. <RowDefinition Height="80"/>
  78. <RowDefinition Height="80"/>
  79. <RowDefinition Height="*"/>
  80. <RowDefinition Height="40"/>
  81. <RowDefinition Height="60"/>
  82. <RowDefinition Height="80"/>
  83. <RowDefinition Height="20"/>
  84. </Grid.RowDefinitions>
  85. <StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Height="76" Width="114">
  86. <TextBlock Text="奶茶" FontSize="38" FontFamily="/BPASmartClient.CustomResource;component/Fonts/#zihun80hao-mengquxiaoyuti" HorizontalAlignment="Center"/>
  87. <TextBlock Text="味魔方" FontSize="38" FontFamily="/BPASmartClient.CustomResource;component/Fonts/#zihun80hao-mengquxiaoyuti"/>
  88. </StackPanel>
  89. <Button Grid.Row="2" Style="{StaticResource menuButtonTemplate}" Click="NavButton_Click" Tag="MainControlView" Margin="0,20,0,20">
  90. <StackPanel Orientation="Horizontal">
  91. <TextBlock Text="&#xe61c;" Margin="5,0"/>
  92. <TextBlock Text="主页"/>
  93. </StackPanel>
  94. </Button>
  95. <Button Grid.Row="3" Style="{StaticResource menuButtonTemplate}" Click="NavButton_Click" Tag="MessageLogInfo" Margin="0,20,0,20">
  96. <StackPanel Orientation="Horizontal">
  97. <TextBlock Text="&#xe626;" Margin="5,0"/>
  98. <TextBlock Text="日志"/>
  99. </StackPanel>
  100. </Button>
  101. <Button Grid.Row="4" Style="{StaticResource menuButtonTemplate}" Click="NavButton_Click" Tag="LocalConfigureView" Margin="0,20,0,20">
  102. <StackPanel Orientation="Horizontal">
  103. <TextBlock Text="&#xe63f;" Margin="5,0"/>
  104. <TextBlock Text="配置"/>
  105. </StackPanel>
  106. </Button>
  107. <Button Grid.Row="5" Style="{StaticResource menuButtonTemplate}" Click="NavButton_Click" Tag="ParameterSetting" Margin="0,20,0,20">
  108. <StackPanel Orientation="Horizontal">
  109. <TextBlock Text="&#xe62a;" Margin="5,0"/>
  110. <TextBlock Text="参数"/>
  111. </StackPanel>
  112. </Button>
  113. <control:DateTimeUI Grid.Row="8" HorizontalContentAlignment="Center" />
  114. <Button Grid.Row="9" Style="{StaticResource menuButtonTemplate}" Click="CloseButton_Click" Margin="0,20,0,20">
  115. <StackPanel Orientation="Horizontal">
  116. <TextBlock Text="&#xe892;" Margin="5,0"/>
  117. <TextBlock Text="退出"/>
  118. </StackPanel>
  119. </Button>
  120. <CheckBox Content="开机自启" Grid.Row="7" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="16,0"
  121. IsChecked="{Binding AutoStart}"/>
  122. </Grid>
  123. <Border Grid.Column="1" Grid.RowSpan="3" Background="Transparent">
  124. <Border Background="White" CornerRadius="20" BorderThickness="0" >
  125. <Grid>
  126. <ContentControl x:Name="contentRegion">
  127. <local:MessageLogInfo/>
  128. </ContentControl>
  129. </Grid>
  130. </Border>
  131. </Border>
  132. </Grid>
  133. </Border>
  134. </Window>