voice notifications and settings UI rework
This commit is contained in:
parent
2070aa1c98
commit
c883821fb6
3 changed files with 288 additions and 114 deletions
|
|
@ -2,6 +2,7 @@
|
|||
using Observatory.Framework.Files;
|
||||
using Observatory.Framework.Interfaces;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Observatory.PluginManagement
|
||||
{
|
||||
|
|
@ -26,6 +27,17 @@ namespace Observatory.PluginManagement
|
|||
{
|
||||
InvokeNativeNotification(title, text);
|
||||
}
|
||||
|
||||
if (Properties.Core.Default.VoiceNotify && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
var speech = new System.Speech.Synthesis.SpeechSynthesizer()
|
||||
{
|
||||
Volume = Properties.Core.Default.VoiceVolume,
|
||||
Rate = Properties.Core.Default.VoiceRate
|
||||
};
|
||||
speech.SelectVoice(Properties.Core.Default.VoiceSelected);
|
||||
speech.SpeakAsync(title + ": " + text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue