2026-01-26 18:56:53 +09:00

38 lines
1.0 KiB
C#

/*
* Copyright (c) 2025 LG Electronics Inc.
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
*/
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace VisionCommonUI {
public partial class MessageBoxPassword : Window {
public string Password { get; set; }
public MessageBoxPassword() {
InitializeComponent();
password.Focus();
}
public string ShowPasswordWindow() {
this.ShowDialog();
return Password;
}
private void Button_Click_Enter(object sender, RoutedEventArgs e) {
this.Close();
}
private void MessageBox_KeyDown(object sender, KeyEventArgs e) {
if (e.Key == Key.Enter || e.Key == Key.Escape) {
Button_Click_Enter(sender, e);
}
}
private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e) {
Password = ((PasswordBox)sender).Password;
}
}
}