This commit is contained in:
2025-09-05 20:21:45 -04:00
parent 52c458836d
commit cdf71c8fd7
24 changed files with 1256 additions and 144 deletions

View File

@@ -0,0 +1,48 @@
using System.Media;
using System.Windows;
namespace ServiceBus95
{
/// <summary>
/// Interaction logic for About.xaml
/// </summary>
public partial class MessageBoxWindow : Window
{
public MessageBoxWindow()
{
InitializeComponent();
SoundPlayer player = new SoundPlayer("Resources/Chord.wav");
player.Play();
}
public MessageBoxResult MessageBoxResult { get; set; }
public static MessageBoxResult Show(Window owner, string messageBoxText, string caption)
{
MessageBoxWindow window = new MessageBoxWindow
{
Owner = owner,
Title = caption,
WindowStartupLocation = WindowStartupLocation.CenterOwner
};
window.MessageBoxText.Text = messageBoxText;
window.ShowDialog();
return window.MessageBoxResult;
}
private void OkButton_Click(object sender, RoutedEventArgs e)
{
MessageBoxResult = MessageBoxResult.OK;
Close();
}
private void CancelButton_Click(object sender, RoutedEventArgs e)
{
MessageBoxResult = MessageBoxResult.Cancel;
Close();
}
}
}