diff options
author | sr55 <[email protected]> | 2017-03-16 20:26:05 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2017-03-16 20:26:14 +0000 |
commit | e359b4e1fceb25ad9e9bd7f9543e50339d688e7a (patch) | |
tree | 01bea01e99706e6b8efdc52dfa5805575f214ef7 /win/CS/HandBrakeWPF/Services | |
parent | cdf2b1d0efe8265b66df05f428cf01ff67bb4621 (diff) |
WinGui: Add option to show progress percentage in app title bar, and the task tray header and system tray tooltip. (Configured via preferences). #630
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Interfaces/INotifyIconService.cs | 15 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/NotifyIconService.cs | 25 |
2 files changed, 40 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Interfaces/INotifyIconService.cs b/win/CS/HandBrakeWPF/Services/Interfaces/INotifyIconService.cs new file mode 100644 index 000000000..439c74e4b --- /dev/null +++ b/win/CS/HandBrakeWPF/Services/Interfaces/INotifyIconService.cs @@ -0,0 +1,15 @@ +// <copyright file="INotifyIconService.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> + +namespace HandBrakeWPF.Services.Interfaces +{ + using System.Windows.Forms; + + public interface INotifyIconService + { + void RegisterNotifyIcon(NotifyIcon ni); + + void SetTooltip(string text); + } +}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/NotifyIconService.cs b/win/CS/HandBrakeWPF/Services/NotifyIconService.cs new file mode 100644 index 000000000..2319f93bc --- /dev/null +++ b/win/CS/HandBrakeWPF/Services/NotifyIconService.cs @@ -0,0 +1,25 @@ +// <copyright file="NotifyIconService.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> + +namespace HandBrakeWPF.Services +{ + using System.Windows.Forms; + + using HandBrakeWPF.Services.Interfaces; + + public class NotifyIconService : INotifyIconService + { + private NotifyIcon notifyIcon; + + public void RegisterNotifyIcon(NotifyIcon ni) + { + this.notifyIcon = ni; + } + + public void SetTooltip(string text) + { + this.notifyIcon.Text = text; + } + } +} |