65 lines
1.8 KiB
C#
65 lines
1.8 KiB
C#
// Copyright (c) 2023 schick Informatik
|
|
// Description: Show about info and allow user detail editing
|
|
//
|
|
|
|
using System;
|
|
using System.Diagnostics;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace BreCalClient
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for AboutDialog.xaml
|
|
/// </summary>
|
|
public partial class AboutDialog : Window
|
|
{
|
|
|
|
#region Construction
|
|
|
|
public AboutDialog()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region events
|
|
|
|
public event Action<string, string>? ChangePasswordRequested;
|
|
|
|
#endregion
|
|
|
|
#region event handler
|
|
|
|
private void buttonClose_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
private void buttonChangePassword_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
this.ChangePasswordRequested?.Invoke(this.wpBoxOldPassword.Password, this.wpBoxNewPassword.Password);
|
|
}
|
|
|
|
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
|
|
{
|
|
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true });
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void wpBoxOldPassword_TextChanged(object sender, TextChangedEventArgs e)
|
|
{
|
|
this.buttonChangePassword.IsEnabled =
|
|
(this.wpBoxOldPassword.Password.Length > 0) &&
|
|
(this.wpBoxNewPassword.Password.Length > 0) &&
|
|
(this.wpBoxNewPasswordRepeat.Password.Length > 0) &&
|
|
this.wpBoxNewPassword.Password.Equals(this.wpBoxNewPasswordRepeat.Password) &&
|
|
(!this.wpBoxNewPassword.Password.Equals(this.wpBoxOldPassword.Password));
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|