整体调整了功能
This commit is contained in:
227
FATrace.WPLApp/Views/UserManageView.xaml
Normal file
227
FATrace.WPLApp/Views/UserManageView.xaml
Normal file
@@ -0,0 +1,227 @@
|
||||
<UserControl
|
||||
x:Class="FATrace.WPLApp.Views.UserManageView"
|
||||
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:prism="http://prismlibrary.com/"
|
||||
d:DesignHeight="720"
|
||||
d:DesignWidth="1280"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="Bool2Vis" />
|
||||
</UserControl.Resources>
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Margin="0,0,0,8"
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="用户管理" />
|
||||
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Padding="10"
|
||||
Background="#F9F9F9"
|
||||
BorderBrush="#DDDDDD"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,10,8"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" Text="用户名:" />
|
||||
<TextBox Width="220" Text="{Binding UserName, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Margin="0,0,10,8"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" Text="等级:" />
|
||||
<ComboBox
|
||||
Width="160"
|
||||
ItemsSource="{Binding AccessLevelOptions}"
|
||||
SelectedItem="{Binding AccessLevel, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,5,10,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Width="80"
|
||||
Margin="0,0,8,0"
|
||||
Command="{Binding SearchCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,6,0"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="16"
|
||||
Text="" />
|
||||
<TextBlock Text="查询" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button
|
||||
Width="80"
|
||||
Margin="0,0,18,0"
|
||||
Command="{Binding ClearCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,6,0"
|
||||
FontFamily="/Assets/Fonts/#iconfont"
|
||||
FontSize="16"
|
||||
Text="" />
|
||||
<TextBlock Text="清空" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
Width="80"
|
||||
Margin="0,0,8,0"
|
||||
Command="{Binding AddCommand}"
|
||||
IsEnabled="{Binding CanEditUsers}">
|
||||
<TextBlock Text="新增" />
|
||||
</Button>
|
||||
<Button
|
||||
Width="80"
|
||||
Margin="0,0,8,0"
|
||||
Command="{Binding EditCommand}"
|
||||
IsEnabled="{Binding CanEditUsers}">
|
||||
<TextBlock Text="编辑" />
|
||||
</Button>
|
||||
<Button
|
||||
Width="80"
|
||||
Command="{Binding DeleteCommand}"
|
||||
IsEnabled="{Binding CanEditUsers}">
|
||||
<TextBlock Text="删除" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<DataGrid
|
||||
Grid.Row="2"
|
||||
Margin="0,10,0,10"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
FontSize="15"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding Items}"
|
||||
RowHeight="34"
|
||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
<Setter Property="FontSize" Value="18" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Width="80"
|
||||
Binding="{Binding Id}"
|
||||
Header="Id"
|
||||
Visibility="Hidden" />
|
||||
<DataGridTextColumn
|
||||
Width="180"
|
||||
Binding="{Binding UserName}"
|
||||
Header="用户名" />
|
||||
<DataGridTextColumn
|
||||
Width="120"
|
||||
Binding="{Binding AccessLevel}"
|
||||
Header="等级" />
|
||||
<DataGridTextColumn
|
||||
Width="180"
|
||||
Binding="{Binding CreateTime, StringFormat=yyyy-MM-dd HH:mm:ss}"
|
||||
Header="创建时间" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<StatusBar Grid.Row="3">
|
||||
<StatusBarItem>
|
||||
<TextBlock Text="本页:" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<TextBlock Text="{Binding Items.Count}" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<TextBlock Text=" 总数:" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<TextBlock Text="{Binding TotalCount}" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<Separator Width="20" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<TextBlock Text="页码:" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<TextBlock Text="{Binding PageIndex}" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<TextBlock Text="/" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<TextBlock Text="{Binding TotalPages}" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<Button
|
||||
Width="40"
|
||||
Margin="5,0"
|
||||
Command="{Binding FirstPageCommand}"
|
||||
Content="|<" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<Button
|
||||
Width="40"
|
||||
Margin="5,0"
|
||||
Command="{Binding PrevPageCommand}"
|
||||
Content="<" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<Button
|
||||
Width="40"
|
||||
Margin="5,0"
|
||||
Command="{Binding NextPageCommand}"
|
||||
Content=">" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem>
|
||||
<Button
|
||||
Width="40"
|
||||
Margin="5,0"
|
||||
Command="{Binding LastPageCommand}"
|
||||
Content=">|" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem HorizontalAlignment="Right">
|
||||
<TextBlock Text="正在处理..." Visibility="{Binding IsBusy, Converter={StaticResource Bool2Vis}}" />
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user