终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

241 lines
13 KiB

  1. <Window x:Class="BPASmart.RecipeManagement.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:BPASmart.RecipeManagement"
  7. xmlns:view="clr-namespace:BPASmart.RecipeManagement.View"
  8. xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
  9. mc:Ignorable="d"
  10. Title="MainWindow" Height="800" Width="1400" WindowStyle="None" WindowStartupLocation="CenterScreen" Background="#01003B" AllowsTransparency="True">
  11. <Window.DataContext>
  12. <vm:MainWindowViewModel/>
  13. </Window.DataContext>
  14. <Window.Resources>
  15. <Style x:Key="fonticon" TargetType="{x:Type TextBlock}">
  16. <Setter Property="FontFamily" Value="pack://application:,,,/Font/#iconfont"/>
  17. <Setter Property="FontSize" Value="24"/>
  18. <Setter Property="Foreground" Value="White"/>
  19. <Setter Property="HorizontalAlignment" Value="Center"/>
  20. <Setter Property="VerticalAlignment" Value="Center"/>
  21. <Setter Property="Margin" Value="0,0,20,0"/>
  22. </Style>
  23. <Style x:Key="RadioNavigation" TargetType="RadioButton">
  24. <Setter Property="Margin" Value="-4,0"/>
  25. <Setter Property="Background" Value="Transparent"/>
  26. <Setter Property="GroupName" Value="Navigation"/>
  27. <Setter Property="VerticalAlignment" Value="Center"/>
  28. <Setter Property="HorizontalAlignment" Value="Center"/>
  29. <Setter Property="Template">
  30. <Setter.Value>
  31. <ControlTemplate TargetType="RadioButton">
  32. <Border x:Name="_borderOver" Background="Transparent" Width="200" BorderBrush="Transparent" BorderThickness="0,1">
  33. <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
  34. <TextBlock Foreground="White" Text="{TemplateBinding Content}" FontSize="24" Background="Transparent"
  35. VerticalAlignment="Center" HorizontalAlignment="Center"/>
  36. </Grid>
  37. </Border>
  38. <ControlTemplate.Triggers>
  39. <Trigger Property="IsMouseOver" Value="True">
  40. <Setter Property="BorderBrush" TargetName="_borderOver" Value="#1971B6"/>
  41. <Setter Property="Background" TargetName="_borderOver">
  42. <Setter.Value>
  43. <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
  44. <GradientStop Color="#104E8B" Offset="0"/>
  45. <GradientStop Color="#1874CD" Offset="0.4"/>
  46. <GradientStop Color="#1874CD" Offset="0.6"/>
  47. <GradientStop Color="#27408B" Offset="1"/>
  48. </LinearGradientBrush>
  49. </Setter.Value>
  50. </Setter>
  51. </Trigger>
  52. <Trigger Property="IsChecked" Value="True">
  53. <Setter Property="Background" TargetName="_borderOver" >
  54. <Setter.Value>
  55. <ImageBrush ImageSource="../Image/leftImage.png"/>
  56. </Setter.Value>
  57. </Setter>
  58. </Trigger>
  59. </ControlTemplate.Triggers>
  60. </ControlTemplate>
  61. </Setter.Value>
  62. </Setter>
  63. </Style>
  64. <ControlTemplate x:Key="butonTempalte" TargetType="RadioButton">
  65. <Border x:Name="_borderOver" Background="Transparent" Width="200" Height="60" BorderBrush="Transparent" BorderThickness="0,1">
  66. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  67. </Border>
  68. <ControlTemplate.Triggers>
  69. <Trigger Property="IsMouseOver" Value="True">
  70. <Setter Property="BorderBrush" TargetName="_borderOver" Value="#1971B6"/>
  71. <Setter Property="Background" TargetName="_borderOver">
  72. <Setter.Value>
  73. <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
  74. <GradientStop Color="#104E8B" Offset="0"/>
  75. <GradientStop Color="#1874CD" Offset="0.4"/>
  76. <GradientStop Color="#1874CD" Offset="0.6"/>
  77. <GradientStop Color="#27408B" Offset="1"/>
  78. </LinearGradientBrush>
  79. </Setter.Value>
  80. </Setter>
  81. </Trigger>
  82. <Trigger Property="IsChecked" Value="True">
  83. <Setter Property="Background" TargetName="_borderOver" >
  84. <Setter.Value>
  85. <ImageBrush ImageSource="../Image/leftImage.png"/>
  86. </Setter.Value>
  87. </Setter>
  88. </Trigger>
  89. </ControlTemplate.Triggers>
  90. </ControlTemplate>
  91. </Window.Resources>
  92. <Grid >
  93. <Grid.ColumnDefinitions>
  94. <ColumnDefinition Width="200"/>
  95. <ColumnDefinition Width="*"/>
  96. <ColumnDefinition Width="2"/>
  97. </Grid.ColumnDefinitions>
  98. <Grid.RowDefinitions>
  99. <RowDefinition Height="50"/>
  100. <RowDefinition Height="*"/>
  101. </Grid.RowDefinitions>
  102. <Border x:Name="br" Grid.ColumnSpan="3 " MouseLeftButtonDown="Border_MouseLeftButtonDown" BorderBrush="#4682B4" BorderThickness="0,0,0,1">
  103. <Border.Background>
  104. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  105. <GradientStop Color="#0C2349" Offset="0.2"/>
  106. <GradientStop Color="#6495ED" Offset="0.4"/>
  107. <GradientStop Color="#0C2349" Offset="1"/>
  108. </LinearGradientBrush>
  109. </Border.Background>
  110. <StackPanel Orientation="Horizontal" Margin="60,0,0,0" VerticalAlignment="Center">
  111. <Image Source="../image/recipe.png" Width="20" Height="20"/>
  112. <TextBlock Text="配方集成管理" Foreground="#E8E8E8" FontSize="30" FontFamily="楷体"
  113. HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,0">
  114. <TextBlock.Effect>
  115. <DropShadowEffect Direction="70" Color="Black" />
  116. </TextBlock.Effect>
  117. </TextBlock>
  118. </StackPanel>
  119. </Border>
  120. <Button Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Transparent"
  121. Height="45" Width="45" Click="Button_Click" BorderBrush="Transparent" >
  122. <Button.Style>
  123. <Style TargetType="Button" >
  124. <Style.Setters>
  125. <Setter Property="Template">
  126. <Setter.Value>
  127. <ControlTemplate TargetType="Button">
  128. <Border x:Name="border" BorderThickness="1" Background="Transparent" Padding="0" >
  129. <Image x:Name="image" Source="../image/Exit.png" Stretch="UniformToFill"
  130. VerticalAlignment="Center" HorizontalAlignment="Center" />
  131. </Border>
  132. <ControlTemplate.Triggers>
  133. <Trigger Property="IsMouseOver" Value="True">
  134. <Setter TargetName="image" Property="Margin" Value="-3"/>
  135. </Trigger>
  136. </ControlTemplate.Triggers>
  137. </ControlTemplate>
  138. </Setter.Value>
  139. </Setter>
  140. </Style.Setters>
  141. </Style>
  142. </Button.Style>
  143. </Button>
  144. <Border Grid.Row="1" Grid.RowSpan="2" BorderBrush="#1E90FF" BorderThickness="0,0,2,0">
  145. <Border.Background>
  146. <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
  147. <GradientStop Color="#01003B" Offset="0.2"/>
  148. <GradientStop Color="#010050" Offset="1"/>
  149. </LinearGradientBrush>
  150. </Border.Background>
  151. </Border>
  152. <StackPanel x:Name="mylistview" Background="Transparent" Grid.RowSpan="1" Grid.Row="1"
  153. ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
  154. MouseLeftButtonDown="mylistview_MouseDown" >
  155. <RadioButton Style="{DynamicResource RadioNavigation}" IsChecked="True" Template="{DynamicResource butonTempalte }"
  156. Click="NavButton_Click" Tag="OrderManager">
  157. <Grid Background="Transparent" >
  158. <Grid.ColumnDefinitions>
  159. <ColumnDefinition Width="auto"/>
  160. <ColumnDefinition Width="*"/>
  161. </Grid.ColumnDefinitions>
  162. <TextBlock Text="&#xe737;" Style="{DynamicResource fonticon}"/>
  163. <TextBlock Grid.Column="1" Foreground="White" Text="订单管理" FontSize="24" Background="Transparent"
  164. VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
  165. </Grid>
  166. </RadioButton>
  167. <RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
  168. Click="NavButton_Click" Tag="RecipeManager">
  169. <Grid Background="Transparent" >
  170. <Grid.ColumnDefinitions>
  171. <ColumnDefinition Width="auto"/>
  172. <ColumnDefinition Width="*"/>
  173. </Grid.ColumnDefinitions>
  174. <TextBlock Text="&#xe683;" Style="{DynamicResource fonticon}"/>
  175. <TextBlock Grid.Column="1" Foreground="White" Text="配方管理" FontSize="24" Background="Transparent"
  176. VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
  177. </Grid>
  178. </RadioButton>
  179. <RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
  180. Click="NavButton_Click" Tag="MaterialManager">
  181. <Grid Background="Transparent" >
  182. <Grid.ColumnDefinitions>
  183. <ColumnDefinition Width="auto"/>
  184. <ColumnDefinition Width="*"/>
  185. </Grid.ColumnDefinitions>
  186. <TextBlock Text="&#xe63b;" Style="{DynamicResource fonticon}"/>
  187. <TextBlock Grid.Column="1" Foreground="White" Text="原料管理" FontSize="24" Background="Transparent"
  188. VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
  189. </Grid>
  190. </RadioButton>
  191. <!--<RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
  192. Click="NavButton_Click" Tag="TechnologySetting">
  193. <Grid Background="Transparent" >
  194. <Grid.ColumnDefinitions>
  195. <ColumnDefinition Width="auto"/>
  196. <ColumnDefinition Width="*"/>
  197. </Grid.ColumnDefinitions>
  198. <TextBlock Text="&#xe69b;" Style="{DynamicResource fonticon}"/>
  199. <TextBlock Grid.Column="1" Foreground="White" Text="工艺参数" FontSize="24" Background="Transparent"
  200. VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
  201. </Grid>
  202. </RadioButton>-->
  203. <RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
  204. Click="NavButton_Click" Tag="PowerManager">
  205. <Grid Background="Transparent" >
  206. <Grid.ColumnDefinitions>
  207. <ColumnDefinition Width="auto"/>
  208. <ColumnDefinition Width="*"/>
  209. </Grid.ColumnDefinitions>
  210. <TextBlock Text="&#xe60c;" Style="{DynamicResource fonticon}"/>
  211. <TextBlock Grid.Column="1" Foreground="White" Text="权限分配" FontSize="24" Background="Transparent"
  212. VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
  213. </Grid>
  214. </RadioButton>
  215. </StackPanel>
  216. <ContentControl x:Name="contentRegion" Grid.Column="1" Grid.Row="1" Background="#01003B" BorderBrush="Transparent">
  217. <view:OrderManager/>
  218. </ContentControl>
  219. </Grid>
  220. </Window>