新增账户信息显示和账户注销功能。
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:软件系统客户端Wpf"
|
||||
xmlns:y="clr-namespace:ClientsLibrary;assembly=ClientsLibrary"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="350" Width="525" WindowState="Maximized" Activated="Window_Activated" Closing="Window_Closing" ContentRendered="Window_ContentRendered" Initialized="Window_Initialized"
|
||||
Loaded="Window_Loaded">
|
||||
@@ -154,13 +155,92 @@
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid DockPanel.Dock="Right" Width="180">
|
||||
<Grid DockPanel.Dock="Right" Width="auto" MinWidth="220">
|
||||
<StackPanel>
|
||||
<materialDesign:Chip x:Name="AccountChip" Content="" Margin="0 0 6 4" Click="AccountChip_Click">
|
||||
<materialDesign:Chip.Icon>
|
||||
<Image x:Name="AccountPortrait"/>
|
||||
</materialDesign:Chip.Icon>
|
||||
</materialDesign:Chip>
|
||||
<GroupBox Grid.Column="0" Grid.Row="0" Header="账户信息" Margin="2,0,0,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<materialDesign:Chip x:Name="AccountChip" Content="" Margin="0 0 6 4" Click="AccountChip_Click" VerticalAlignment="Center">
|
||||
<materialDesign:Chip.Icon>
|
||||
<Image x:Name="AccountPortrait"/>
|
||||
</materialDesign:Chip.Icon>
|
||||
</materialDesign:Chip>
|
||||
|
||||
<Button Style="{StaticResource MaterialDesignRaisedLightButton}" Grid.Column="1" Width="60" VerticalAlignment="Center"
|
||||
Click="Button_Quit_Click">
|
||||
注销
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0">权限等级:</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0">所属分厂:</TextBlock>
|
||||
<TextBlock Grid.Row="3" Grid.Column="0">注册时间:</TextBlock>
|
||||
<TextBlock Grid.Row="4" Grid.Column="0">登录频次:</TextBlock>
|
||||
<TextBlock Grid.Row="5" Grid.Column="0">最近登录:</TextBlock>
|
||||
<TextBlock Grid.Row="6" Grid.Column="0">上次登录IP:</TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" x:Name="Account_grade"></TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" x:Name="Account_factory"></TextBlock>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" x:Name="Account_register"></TextBlock>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" x:Name="Account_last"></TextBlock>
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" x:Name="Account_times"></TextBlock>
|
||||
<TextBlock Grid.Row="6" Grid.Column="1" x:Name="Account_address"></TextBlock>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Grid.Column="0" Grid.Row="0" Header="系统信息" Margin="2,5,0,0">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
<RowDefinition Height="auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0">权限等级:</TextBlock>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0">所属分厂:</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0">注册时间:</TextBlock>
|
||||
<TextBlock Grid.Row="3" Grid.Column="0">登录频次:</TextBlock>
|
||||
<TextBlock Grid.Row="4" Grid.Column="0">最近登录:</TextBlock>
|
||||
<TextBlock Grid.Row="5" Grid.Column="0">上次登录IP:</TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="1"></TextBlock>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1"></TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1"></TextBlock>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1"></TextBlock>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1"></TextBlock>
|
||||
<TextBlock Grid.Row="5" Grid.Column="1"></TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ namespace 软件系统客户端Wpf
|
||||
//显示头像
|
||||
SoftUserPortraitInitialization();
|
||||
SoftUserPortrait.DownloadUserPortraint();
|
||||
AccountChip.Content = UserClient.UserAccount.UserName;
|
||||
}
|
||||
|
||||
private void Window_Initialized(object sender, EventArgs e)
|
||||
@@ -134,13 +135,12 @@ namespace 软件系统客户端Wpf
|
||||
{
|
||||
//在窗体加载时触发,窗体还不显示任何东西
|
||||
//窗口载入
|
||||
//label_userName.Text = UserClient.UserAccount.UserName;
|
||||
//label_grade.Text = AccountGrade.GetDescription(UserClient.UserAccount.Grade);
|
||||
//label_factory.Text = UserClient.UserAccount.Factory;
|
||||
//label_register.Text = UserClient.UserAccount.RegisterTime.ToString();
|
||||
//label_last.Text = UserClient.UserAccount.LastLoginTime.ToString();
|
||||
//label_times.Text = UserClient.UserAccount.LoginFrequency.ToString();
|
||||
//label_address.Text = UserClient.UserAccount.LastLoginIpAddress;
|
||||
Account_grade.Text = AccountGrade.GetDescription(UserClient.UserAccount.Grade);
|
||||
Account_factory.Text = UserClient.UserAccount.Factory;
|
||||
Account_register.Text = UserClient.UserAccount.RegisterTime.ToString();
|
||||
Account_last.Text = UserClient.UserAccount.LastLoginTime.ToString();
|
||||
Account_times.Text = UserClient.UserAccount.LoginFrequency.ToString();
|
||||
Account_address.Text = UserClient.UserAccount.LastLoginIpAddress;
|
||||
|
||||
//状态栏设置
|
||||
TextBlock_CopyRight.Text = $"本软件著作权归{Resource.StringResouce.SoftCopyRight}所有";
|
||||
@@ -332,6 +332,11 @@ namespace 软件系统客户端Wpf
|
||||
}
|
||||
}
|
||||
|
||||
private void Button_Quit_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
App.QuitCode = 1;
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -598,8 +603,9 @@ namespace 软件系统客户端Wpf
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user