aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-06-14 15:57:24 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-06-14 15:57:24 +0300
commita775178c063082eb6a401b4254a046133840af03 (patch)
tree4ba9572da806e6e5ec031853188f6f335546fb57 /Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
parent099cb04861e293cf675d8b5216448a766eef7954 (diff)
downloadTango-a775178c063082eb6a401b4254a046133840af03.tar.gz
Tango-a775178c063082eb6a401b4254a046133840af03.zip
Working on PPC...
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs43
1 files changed, 37 insertions, 6 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
index 8c42a3a44..82640f899 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs
@@ -13,15 +13,27 @@ using Tango.SharedUI.Controls;
namespace Tango.PPC.UI.Navigation
{
+ /// <summary>
+ /// Represents the default PPC navigation manager.
+ /// </summary>
+ /// <seealso cref="Tango.PPC.Common.Navigation.INavigationManager" />
public class DefaultNavigationManager : INavigationManager
{
private IPPCModuleLoader _moduleLoader;
+ /// <summary>
+ /// Initializes a new instance of the <see cref="DefaultNavigationManager"/> class.
+ /// </summary>
+ /// <param name="moduleLoader">The module loader.</param>
public DefaultNavigationManager(IPPCModuleLoader moduleLoader)
{
_moduleLoader = moduleLoader;
}
+ /// <summary>
+ /// Navigates to the specified PPC view.
+ /// </summary>
+ /// <param name="view">The view.</param>
public void NavigateTo(NavigationView view)
{
if (view == NavigationView.HomeModule)
@@ -36,6 +48,10 @@ namespace Tango.PPC.UI.Navigation
}
}
+ /// <summary>
+ /// Navigates to the specified module.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
public void NavigateTo<T>() where T : IPPCModule
{
MainView.Instance.NavigationControl.NavigateTo(NavigationView.LayoutView.ToString());
@@ -44,11 +60,32 @@ namespace Tango.PPC.UI.Navigation
navigationControl.NavigateTo(module.Name);
}
+ /// <summary>
+ /// Navigates to the specified module name.
+ /// </summary>
+ /// <param name="moduleName">Name of the module.</param>
+ public void NavigateTo(string moduleName)
+ {
+ var navigationControl = LayoutView.Instance.NavigationControl;
+ navigationControl.NavigateTo(moduleName);
+ }
+
+ /// <summary>
+ /// Navigates to the specified module using the view path (e.g MainView.JobsView).
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="viewPath">The view path.</param>
public void NavigateTo<T>(string viewPath) where T : IPPCModule
{
NavigateTo<T>(viewPath.Split(','));
}
+ /// <summary>
+ /// Navigates to the specified module using the view path (e.g MainView,JobsView).
+ /// This method makes it easy to do stuff like NavigateTo(nameof(MainView),nameof(JobsView));
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="viewPath">The view path.</param>
public void NavigateTo<T>(params String[] viewPath) where T : IPPCModule
{
MainView.Instance.NavigationControl.NavigateTo(NavigationView.LayoutView.ToString());
@@ -72,11 +109,5 @@ namespace Tango.PPC.UI.Navigation
});
}
}
-
- public void NavigateTo(string moduleName)
- {
- var navigationControl = LayoutView.Instance.NavigationControl;
- navigationControl.NavigateTo(moduleName);
- }
}
}