44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
/*
|
|
* Copyright (c) 2025 LG Electronics Inc.
|
|
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
|
|
*/
|
|
using System.Windows;
|
|
using System.Windows.Input;
|
|
|
|
namespace VisionCommonUI {
|
|
public partial class MessageBoxQuestion : Window {
|
|
MessageBoxResult mMessageBoxResult = MessageBoxResult.None;
|
|
|
|
public MessageBoxQuestion() {
|
|
InitializeComponent();
|
|
}
|
|
|
|
public MessageBoxResult ShowDialog(string statusMsg) {
|
|
tbStatusMessage.Text = statusMsg;
|
|
this.ShowDialog();
|
|
|
|
return mMessageBoxResult;
|
|
}
|
|
|
|
private void Button_Click_Question_Yes(object sender, RoutedEventArgs e) {
|
|
mMessageBoxResult = MessageBoxResult.Yes;
|
|
tbStatusMessage.Text = string.Empty;
|
|
this.Close();
|
|
}
|
|
|
|
private void Button_Click_Question_No(object sender, RoutedEventArgs e) {
|
|
mMessageBoxResult = MessageBoxResult.No;
|
|
tbStatusMessage.Text = string.Empty;
|
|
this.Close();
|
|
}
|
|
|
|
private void MessageBox_KeyDown(object sender, KeyEventArgs e) {
|
|
if (e.Key == Key.Enter) {
|
|
Button_Click_Question_Yes(sender, e);
|
|
}
|
|
else if (e.Key == Key.Escape) {
|
|
Button_Click_Question_No(sender, e);
|
|
}
|
|
}
|
|
}
|
|
} |