diff --git a/Library/FloatingStatusWindow.cs b/Library/FloatingStatusWindow.cs
index b52e082..4cf4666 100644
--- a/Library/FloatingStatusWindow.cs
+++ b/Library/FloatingStatusWindow.cs
@@ -118,6 +118,15 @@ namespace FloatingStatusWindowLibrary
contextMenu.Items.Add(new Separator());
+ if (_windowSource.HasAboutMenu)
+ {
+ menuItem = new MenuItem { Header = Resources.ContextMenuAbout };
+ menuItem.Click += (sender, args) => _windowSource.ShowAbout();
+ contextMenu.Items.Add(menuItem);
+
+ contextMenu.Items.Add(new Separator());
+ }
+
menuItem = new MenuItem
{
Name = "contextMenuItemExit",
diff --git a/Library/IWindowSource.cs b/Library/IWindowSource.cs
index 35adca3..4567313 100644
--- a/Library/IWindowSource.cs
+++ b/Library/IWindowSource.cs
@@ -10,8 +10,10 @@ namespace FloatingStatusWindowLibrary
bool HasSettingsMenu { get; }
bool HasRefreshMenu { get; }
+ bool HasAboutMenu { get; }
void ShowSettings();
void Refresh();
+ void ShowAbout();
}
}
diff --git a/Library/Properties/Resources.Designer.cs b/Library/Properties/Resources.Designer.cs
index e8803a2..b3f436e 100644
--- a/Library/Properties/Resources.Designer.cs
+++ b/Library/Properties/Resources.Designer.cs
@@ -105,6 +105,15 @@ namespace FloatingStatusWindowLibrary.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to About.
+ ///
+ public static string ContextMenuAbout {
+ get {
+ return ResourceManager.GetString("ContextMenuAbout", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Start with Windows.
///
diff --git a/Library/Properties/Resources.resx b/Library/Properties/Resources.resx
index f49de81..0237748 100644
--- a/Library/Properties/Resources.resx
+++ b/Library/Properties/Resources.resx
@@ -132,6 +132,9 @@
Change Appearance
+
+ About
+
Start with Windows
diff --git a/TestWindow/WindowSource1.cs b/TestWindow/WindowSource1.cs
index 3e8c6bb..8092ae8 100644
--- a/TestWindow/WindowSource1.cs
+++ b/TestWindow/WindowSource1.cs
@@ -1,6 +1,7 @@
using FloatingStatusWindowLibrary;
using System;
using System.Globalization;
+using System.Reflection;
using System.Timers;
using System.Windows.Threading;
@@ -53,6 +54,13 @@ namespace TestWindow
get { return true; }
}
+ public bool HasAboutMenu => true;
+
+ public void ShowAbout()
+ {
+ _floatingStatusWindow.SetText(Assembly.GetEntryAssembly().GetName().Version.ToString());
+ }
+
public void ShowSettings()
{
diff --git a/TestWindow/WindowSource2.cs b/TestWindow/WindowSource2.cs
index 1087d39..b7b0a68 100644
--- a/TestWindow/WindowSource2.cs
+++ b/TestWindow/WindowSource2.cs
@@ -1,6 +1,7 @@
using FloatingStatusWindowLibrary;
using System;
using System.Globalization;
+using System.Reflection;
using System.Timers;
using System.Windows.Threading;
@@ -53,6 +54,13 @@ namespace TestWindow
get { return true; }
}
+ public bool HasAboutMenu => true;
+
+ public void ShowAbout()
+ {
+ _floatingStatusWindow.SetText(Assembly.GetEntryAssembly().GetName().Version.ToString());
+ }
+
public void ShowSettings()
{
diff --git a/TestWindow/WindowSource3.cs b/TestWindow/WindowSource3.cs
index 50a35b2..95a9d41 100644
--- a/TestWindow/WindowSource3.cs
+++ b/TestWindow/WindowSource3.cs
@@ -1,6 +1,7 @@
using FloatingStatusWindowLibrary;
using System;
using System.Globalization;
+using System.Reflection;
using System.Timers;
using System.Windows.Threading;
@@ -53,6 +54,13 @@ namespace TestWindow
get { return true; }
}
+ public bool HasAboutMenu => true;
+
+ public void ShowAbout()
+ {
+ _floatingStatusWindow.SetText(Assembly.GetEntryAssembly().GetName().Version.ToString());
+ }
+
public void ShowSettings()
{
diff --git a/TestWindow/WindowSource4.cs b/TestWindow/WindowSource4.cs
index 949ecc2..585dfc9 100644
--- a/TestWindow/WindowSource4.cs
+++ b/TestWindow/WindowSource4.cs
@@ -1,6 +1,7 @@
using FloatingStatusWindowLibrary;
using System;
using System.Globalization;
+using System.Reflection;
using System.Timers;
using System.Windows.Threading;
@@ -53,6 +54,13 @@ namespace TestWindow
get { return true; }
}
+ public bool HasAboutMenu => true;
+
+ public void ShowAbout()
+ {
+ _floatingStatusWindow.SetText(Assembly.GetEntryAssembly().GetName().Version.ToString());
+ }
+
public void ShowSettings()
{