2026-06-05 13:44:39 +09:00

31 lines
862 B
C#

using System.Windows;
using System.Windows.Input;
namespace VisionCommonUI {
public partial class MessageBoxWarning : Window {
public MessageBoxWarning() {
InitializeComponent();
}
public void Show(string statusMsg) {
tbStatusMessage.Text = statusMsg;
this.Show();
}
public void ShowDialog(string statusMsg) {
tbStatusMessage.Text = statusMsg;
this.ShowDialog();
}
private void Button_Click_Warning(object sender, RoutedEventArgs e) {
tbStatusMessage.Text = string.Empty;
this.Close();
}
private void MessageBox_KeyDown(object sender, KeyEventArgs e) {
if (e.Key == Key.Enter || e.Key == Key.Escape) {
Button_Click_Warning(sender, e);
}
}
}
}