XiangTan_JiaoJie_Bak/DM_Weight/Views/HomeWindow.xaml

136 lines
7.3 KiB
Plaintext
Raw Normal View History

2025-01-06 09:40:32 +08:00
<!--布局界面-->
<UserControl x:Class="DM_Weight.Views.HomeWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
xmlns:prism="http://prismlibrary.com/"
FontFamily="{DynamicResource MaterialDesignFont}"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d" Cursor="Hand">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Grid Background="#00bcd4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<!--<Image Grid.Column="0" Margin="30 0 30 0" HorizontalAlignment="Left" Width="Auto" Height="26" Source="/Images/logo.png" />-->
<TextBlock Text="交接柜管理系统" Grid.Column="0" Margin="30 0 30 0" HorizontalAlignment="Left" Width="Auto" Height="26" Foreground="White" FontSize="20" FontWeight="Bold" />
<ListBox SelectionMode="Extended" Name="ListBoxName" Grid.Column="1" SelectedItem="{Binding SelectedMenu}" ItemsSource="{Binding PremissionDmList}" HorizontalAlignment="Right" Cursor="Hand">
<!--<i:Interaction.Triggers>
2025-01-06 09:40:32 +08:00
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding SelectionCommon}"/>
</i:EventTrigger>
</i:Interaction.Triggers>-->
2025-01-06 09:40:32 +08:00
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Width="80" Height="64" >
<Image Width="48" Height="48" Source="{ Binding PremissionImage }" />
<TextBlock Foreground="{DynamicResource MaterialDesignPaper}" HorizontalAlignment="Center" FontSize="15" Text="{Binding PremissionName}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<Grid Grid.Row="1" Margin="8,6,8,6">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<materialDesign:Card Grid.Row="0">
<ListBox SelectionMode="Extended" ItemsSource="{Binding SelectedMenu.Children}" SelectedItem="{ Binding SelectedChildMenu }" HorizontalAlignment="left" Cursor="Hand">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding SelectionChildCommon}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Border Padding="0,0,5,0" BorderThickness="0 0 1 0" BorderBrush="#31ccec">
<TextBlock FontWeight="Black" FontSize="14" FontFamily="楷书" Padding="4" Text="{Binding PremissionName}" />
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</materialDesign:Card>
<materialDesign:Card Grid.Row="1" Margin="0 8 0 8">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" Focusable="True">
<ContentControl prism:RegionManager.RegionName="ContentRegion" />
</ScrollViewer>
</materialDesign:Card>
</Grid>
<Grid Background="#2196f3" Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70*"/>
<ColumnDefinition Width="70*"/>
<ColumnDefinition Width="270*"/>
</Grid.ColumnDefinitions>
<Menu Grid.Column="0">
<MenuItem
Foreground="White"
Header="{Binding UserList.Nickname}">
<MenuItem
Command="{Binding OpenFingerDialog}"
CommandParameter="Operator"
Foreground="{DynamicResource MaterialDesignLightForeground}"
Header="录制指纹" />
<MenuItem
Command="{Binding OpenEditPasswordDialog}"
CommandParameter="Operator"
Foreground="{DynamicResource MaterialDesignLightForeground}"
Header="修改密码" />
</MenuItem>
</Menu>
<Menu Grid.Column="1" Visibility="{Binding MultiLogin, Converter={StaticResource BooleanToVisibilityConverter}}">
<MenuItem
Foreground="White"
Header="{Binding UserList2.Nickname}">
<MenuItem
Command="{Binding OpenFingerDialog}"
CommandParameter="Reviewer"
Foreground="{DynamicResource MaterialDesignLightForeground}"
Header="录制指纹" />
<MenuItem
Command="{Binding OpenEditPasswordDialog}"
CommandParameter="Reviewer"
Foreground="{DynamicResource MaterialDesignLightForeground}"
Header="修改密码" />
</MenuItem>
</Menu>
<!--<Grid Grid.Column="2">
<StackPanel Margin="6" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="储物箱" Command="{Binding OpenRecoverCommand}" Visibility="{Binding Is16Drawer, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource MaterialDesignFlatSecondaryLightButton}" />
--><!--<TextBlock Margin="0,10,10,0" Text="{Binding WD}" Foreground="White" FontWeight="Bold" FontSize="14"/>--><!--
<Button Content="查看冰箱温度" Visibility="{Binding HasFridge}" Command="{Binding CheckWDCommand}" Style="{StaticResource MaterialDesignFlatSecondaryLightButton}"/>
</StackPanel>
</Grid>-->
</Grid>
</Grid>
</UserControl>