summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-07-18 20:10:15 +0000
committersr55 <[email protected]>2015-07-18 20:10:15 +0000
commit358cb88d56078fab57c5daf9493704b111217839 (patch)
tree4d16284ff2a4e69227b763f50d99b74826348dcb /win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
parent074663b7aa8e85a85fd6d298ada3cd50500348c8 (diff)
WinGui: Add a Mini Status Display window that can be accessed via the tray notify icon when the app is minimised to tray.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7350 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/ShellView.xaml.cs')
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
index fc5a141b9..4071eeb3c 100644
--- a/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml.cs
@@ -50,7 +50,7 @@ namespace HandBrakeWPF.Views
if (minimiseToTray)
{
this.notifyIcon = new NotifyIcon();
- this.notifyIcon.ContextMenu = new ContextMenu(new[] { new MenuItem("Restore", NotifyIconClick) });
+ this.notifyIcon.ContextMenu = new ContextMenu(new[] { new MenuItem("Restore", NotifyIconClick), new MenuItem("Mini Status Display", ShowMiniStatusDisplay) });
StreamResourceInfo streamResourceInfo = Application.GetResourceStream(new Uri("pack://application:,,,/handbrakepineapple.ico"));
if (streamResourceInfo != null)
@@ -81,6 +81,27 @@ namespace HandBrakeWPF.Views
}
/// <summary>
+ /// The show mini status display.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void ShowMiniStatusDisplay(object sender, EventArgs e)
+ {
+ IMiniViewModel titleSpecificView = IoC.Get<IMiniViewModel>();
+ IWindowManager windowManager = IoC.Get<IWindowManager>();
+ Execute.OnUIThread(
+ () =>
+ {
+ titleSpecificView.Activate();
+ windowManager.ShowWindow(titleSpecificView);
+ });
+ }
+
+ /// <summary>
/// The notify icon_ click.
/// </summary>
/// <param name="sender">