Winify – Diff between revs 14 and 15
?pathlinks?
Rev 14 | Rev 15 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | using System; |
1 | using System; |
|
2 | using System.Diagnostics; |
2 | using System.Diagnostics; |
|
3 | using System.Drawing; |
3 | using System.Drawing; |
|
- | 4 | using System.Speech.Synthesis; |
||
4 | using System.Threading.Tasks; |
5 | using System.Threading.Tasks; |
|
5 | using System.Windows.Forms; |
6 | using System.Windows.Forms; |
|
6 | using Winify.Utilities; |
7 | using Winify.Utilities; |
|
Line 7... | Line 8... | |||
7 | |
8 | |
|
Line 43... | Line 44... | |||
43 | |
44 | |
|
44 | Task.Delay(milliseconds).ContinueWith(task => |
45 | Task.Delay(milliseconds).ContinueWith(task => |
|
45 | this.InvokeIfRequired(form => { form.Close(); })); |
46 | this.InvokeIfRequired(form => { form.Close(); })); |
|
Line -... | Line 47... | |||
- | 47 | } |
||
- | 48 | |
||
- | 49 | public NotificationForm(int index, Image image, string title, string text, int milliseconds, string speak) : |
||
- | 50 | this(index, image, title, text, milliseconds) |
||
- | 51 | { |
||
- | 52 | Task.Run(() => |
||
- | 53 | { |
||
- | 54 | using (var synth = new SpeechSynthesizer()) |
||
- | 55 | { |
||
- | 56 | synth.SetOutputToDefaultAudioDevice(); |
||
- | 57 | synth.Speak(speak); |
||
- | 58 | } |
||
- | 59 | }); |
||
46 | } |
60 | } |
|
47 | |
61 | |
|
48 | /// <summary> |
62 | /// <summary> |
|
49 | /// Clean up any resources being used. |
63 | /// Clean up any resources being used. |
|
50 | /// </summary> |
64 | /// </summary> |