24 changed files with 248 additions and 80 deletions
@ -0,0 +1,30 @@ |
|||
<c:BWindow x:Class="BBWY.Client.Views.Setting.ValidateManagePwd" |
|||
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:local="clr-namespace:BBWY.Client.Views.Setting" |
|||
WindowStartupLocation="CenterScreen" |
|||
CloseButtonVisibility="Visible" |
|||
CloseButtonColor="{StaticResource WindowButtonColor}" |
|||
MinButtonVisibility="Collapsed" |
|||
MaxButtonVisibility="Collapsed" |
|||
RightButtonGroupMargin="0,7,7,0" |
|||
mc:Ignorable="d" |
|||
Title="验证店铺管理密码" Height="100" Width="300" |
|||
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls"> |
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="30"/> |
|||
<RowDefinition/> |
|||
</Grid.RowDefinitions> |
|||
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
|||
Background="{StaticResource Border.Background}"> |
|||
<TextBlock Text="验证店铺管理密码" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
|||
</Border> |
|||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1"> |
|||
<c:BTextBox x:Name="txtManagePwd" WaterRemark="管理密码" Width="200" IsPasswordBox="true"/> |
|||
<c:BButton Content="确定" Width="60" Margin="10,0,0,0" Click="BButton_Click"/> |
|||
</StackPanel> |
|||
</Grid> |
|||
</c:BWindow> |
@ -0,0 +1,30 @@ |
|||
using BBWY.Controls; |
|||
using System.Windows; |
|||
|
|||
namespace BBWY.Client.Views.Setting |
|||
{ |
|||
/// <summary>
|
|||
/// ValidateManagePwd.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class ValidateManagePwd : BWindow |
|||
{ |
|||
|
|||
private string managePwd; |
|||
public ValidateManagePwd(string managePwd) |
|||
{ |
|||
InitializeComponent(); |
|||
this.managePwd = managePwd; |
|||
} |
|||
|
|||
private void BButton_Click(object sender, System.Windows.RoutedEventArgs e) |
|||
{ |
|||
if (txtManagePwd.PasswordStr == managePwd) |
|||
{ |
|||
DialogResult = true; |
|||
this.Close(); |
|||
} |
|||
else |
|||
MessageBox.Show("管理密码错误", "提示"); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue