aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-01-08 17:59:31 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-01-08 17:59:31 +0200
commitaeebb8d47e1d78b50d9ae5afd9df6eaf9765ed87 (patch)
treeac65520ce09b073a5adf3fe01a81634e9381e7af /Software/Visual_Studio/PPC/Tango.PPC.Common
parentb76a8d009b807ddbbb21386ad362deb786c506f4 (diff)
downloadTango-aeebb8d47e1d78b50d9ae5afd9df6eaf9765ed87.tar.gz
Tango-aeebb8d47e1d78b50d9ae5afd9df6eaf9765ed87.zip
Started working on power module...
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/IPPCModule.cs5
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleAttribute.cs16
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs9
3 files changed, 30 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/IPPCModule.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/IPPCModule.cs
index 51f361cfb..cd328fabd 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/IPPCModule.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/IPPCModule.cs
@@ -47,6 +47,11 @@ namespace Tango.PPC.Common
bool IsVisibleInMenu { get; }
/// <summary>
+ /// Gets a value indicating whether to dock this module menu item to the bottom.
+ /// </summary>
+ bool DockToBottom { get; }
+
+ /// <summary>
/// Called when the application has entered the technician mode.
/// </summary>
void OnTechnicianEntered();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleAttribute.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleAttribute.cs
index e166fef04..f175b11d8 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleAttribute.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleAttribute.cs
@@ -24,6 +24,11 @@ namespace Tango.PPC.Common
public String HomeViewName { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether to dock this module menu item to the bottom..
+ /// </summary>
+ public bool DockToBottom { get; set; }
+
+ /// <summary>
/// Initializes a new instance of the <see cref="PPCModuleAttribute"/> class.
/// </summary>
/// <param name="index">The module index.</param>
@@ -41,5 +46,16 @@ namespace Tango.PPC.Common
{
HomeViewName = homeViewName;
}
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PPCModuleAttribute"/> class.
+ /// </summary>
+ /// <param name="index">The module index.</param>
+ /// <param name="homeViewName">Name of the home view.</param>
+ public PPCModuleAttribute(int index, String homeViewName, bool dockToBottom) : this(index, homeViewName)
+ {
+ HomeViewName = homeViewName;
+ DockToBottom = dockToBottom;
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs
index 5aa003c1e..7053e8356 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCModuleBase.cs
@@ -8,6 +8,7 @@ using System.Windows.Media.Imaging;
using Tango.Core;
using Tango.BL.Entities;
using Tango.BL.Enumerations;
+using System.Reflection;
namespace Tango.PPC.Common
{
@@ -28,6 +29,14 @@ namespace Tango.PPC.Common
}
/// <summary>
+ /// Gets a value indicating whether to dock this module menu item to the bottom.
+ /// </summary>
+ public bool DockToBottom
+ {
+ get { return this.GetType().GetCustomAttribute<PPCModuleAttribute>().DockToBottom; }
+ }
+
+ /// <summary>
/// Gets the module name.
/// </summary>
public abstract string Name { get; }