aboutsummaryrefslogtreecommitdiff
path: root/Erable/ViewModels/MainWindowViewModel.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2021-02-09 22:55:40 -0500
committerAndrew Lee <alee14498@protonmail.com>2021-02-09 22:55:40 -0500
commitaefa631ff3f648060f5c0fe5d51aee89e3898a85 (patch)
tree927ffb8f19de6190b20a0180e162e2c8b7f3469e /Erable/ViewModels/MainWindowViewModel.cs
parente81e3817c0a4b735da47e6c45529c6f88ed4d52f (diff)
downloaderable-godot-aefa631ff3f648060f5c0fe5d51aee89e3898a85.tar.gz
erable-godot-aefa631ff3f648060f5c0fe5d51aee89e3898a85.tar.bz2
erable-godot-aefa631ff3f648060f5c0fe5d51aee89e3898a85.zip
Discord RPC; About window
Diffstat (limited to 'Erable/ViewModels/MainWindowViewModel.cs')
-rw-r--r--Erable/ViewModels/MainWindowViewModel.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/Erable/ViewModels/MainWindowViewModel.cs b/Erable/ViewModels/MainWindowViewModel.cs
index 899b49c..c99dfc2 100644
--- a/Erable/ViewModels/MainWindowViewModel.cs
+++ b/Erable/ViewModels/MainWindowViewModel.cs
@@ -11,8 +11,15 @@ namespace Erable.ViewModels
public void PlayFunction()
{
- Thread t = new (Playback.PlayAudio);
- t.Start();
+ try
+ {
+ Thread t = new(Playback.PlayAudio);
+ t.Start();
+ }
+ catch(Exception ex)
+ {
+ MessageBox.Show(new MainWindow(), ex.ToString(), "Error", MessageBox.MessageBoxButtons.Ok);
+ }
}
public void StopFunction()
@@ -48,10 +55,9 @@ namespace Erable.ViewModels
MessageBox.Show(new MainWindow(), "Hello world", "Test Title", MessageBox.MessageBoxButtons.Ok);
}
- public void Quit()
+ public void ExceptionButton()
{
- Environment.Exit(0);
+ throw new Exception();
}
-
}
}