[UI.Client]

移除AccountPasswordChangeDialog窗体。
This commit is contained in:
SL 2023-09-22 11:08:13 +08:00
parent 6d2a10161a
commit 042c45a216
3 changed files with 0 additions and 117 deletions

View File

@ -1,53 +0,0 @@
<Window x:Class="MECF.Framework.UI.Client.ClientBase.Dialog.AccountPasswordChangeDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:MECF.Framework.UI.Client.ClientBase.Dialog"
mc:Ignorable="d"
Height="206" Width="414"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
WindowStyle="ToolWindow"
Title="Change Password">
<Grid Margin="10">
<Grid.Resources>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="0 0 10 0"/>
</Style>
<Style TargetType="PasswordBox">
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="MaxLength" Value="16"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="Old Password"/>
<TextBlock Grid.Row="1" Text="New Password"/>
<TextBlock Grid.Row="2" Text="Confirm Password"/>
<PasswordBox x:Name="OldPassword" Grid.Row="0" Grid.Column="1" />
<PasswordBox x:Name="NewPassword" Grid.Row="1" Grid.Column="1" />
<PasswordBox x:Name="ConfirmPassword" Grid.Row="2" Grid.Column="1" />
<StackPanel Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Right" Orientation="Horizontal" >
<Button x:Name="BtnOk" Content="OK" VerticalAlignment="Center" Height="30" Width="100" Margin="0 0 10 0" Click="BtnOk_OnClick"/>
<Button x:Name="BtnCancel" Content="Cancel" IsCancel="True" VerticalAlignment="Center" Height="30" Width="100" Click="BtnCancel_OnClick"/>
</StackPanel>
</Grid>
</Window>

View File

@ -1,57 +0,0 @@
using System.Diagnostics;
using System.Windows;
using Aitex.Core.Utilities;
using MECF.Framework.UI.Core.Accounts;
using OpenSEMI.ClientBase;
namespace MECF.Framework.UI.Client.ClientBase.Dialog
{
/// <summary>
/// Interaction logic for AccountPasswordChangeDialog.xaml
/// </summary>
public partial class AccountPasswordChangeDialog : Window
{
private readonly string _accountId;
public AccountPasswordChangeDialog(string accountId)
{
_accountId = accountId;
InitializeComponent();
}
#region Properties
public string Password { get; private set; }
#endregion
private void BtnOk_OnClick(object sender, RoutedEventArgs e)
{
Debug.Assert(!string.IsNullOrEmpty(_accountId), "No Account ID.");
if(!AccountClient.Instance.Service.CheckPassword(_accountId, OldPassword.Password))
{
DialogBox.ShowError("Incorrect old password.");
OldPassword.SelectAll();
OldPassword.Focus();
return;
}
if (NewPassword.Password != ConfirmPassword.Password)
{
DialogBox.ShowError("New password does not match.");
NewPassword.SelectAll();
NewPassword.Focus();
return;
}
Password = NewPassword.Password;
DialogResult = true;
}
private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
{
DialogResult = false;
}
}
}

View File

@ -244,9 +244,6 @@
<Compile Include="CenterViews\Modules\PM\ProcessMonitorView.xaml.cs" />
<Compile Include="CenterViews\Modules\PM\ProcessMonitorViewModel.cs" />
<Compile Include="CenterViews\Modules\PM\ShowCloseMonitorWinEvent.cs" />
<Compile Include="ClientBase\Dialog\AccountPasswordChangeDialog.xaml.cs">
<DependentUpon>AccountPasswordChangeDialog.xaml</DependentUpon>
</Compile>
<Compile Include="ClientBase\Dialog\LoginRequestConfirmationDialog.xaml.cs">
<DependentUpon>LoginRequestConfirmationDialog.xaml</DependentUpon>
</Compile>
@ -899,10 +896,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ClientBase\Dialog\AccountPasswordChangeDialog.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ClientBase\Dialog\LoginRequestConfirmationDialog.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>