forked from Dewynion/InstanTTS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.xaml.cs
32 lines (28 loc) · 943 Bytes
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Windows;
using InstanTTS.Audio;
using InstanTTS.Speech;
namespace InstanTTS
{
/// <summary>
/// Base class for the application. Handles startup and exit tasks.
/// </summary>
public partial class App : Application
{
private SpeechSynthManager _speechSynthManager;
private AudioManager _audioManager;
private MainWindow _applicationWindow;
private void Application_Startup(object sender, StartupEventArgs e)
{
_audioManager = new AudioManager();
_speechSynthManager = new SpeechSynthManager();
_applicationWindow = new MainWindow();
_applicationWindow.Show();
}
private void Application_Exit(object sender, ExitEventArgs e)
{
// Dispose of all resources used by audio/speech synth.
_audioManager.Dispose();
_speechSynthManager.Dispose();
}
}
}