using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; namespace Tango.PPC.Common.Navigation { /// /// Represents the PPC views navigation manager. /// public interface INavigationManager { /// /// Occurs when the current view model has changed. /// event EventHandler CurrentVMChanged; /// /// Gets the current module. /// IPPCModule CurrentModule { get; } /// /// Gets the current view model. /// PPCViewModel CurrentVM { get; } /// /// Gets a value indicating whether the navigation system is able to navigate to the previous view. /// bool CanNavigateBack { get; } /// /// Gets a value indicating whether the back should be enabled. /// bool IsBackEnabled { get; set; } /// /// Gets or sets a value indicating whether the navigation system is currently navigating. /// bool IsNavigating { get; set; } /// /// Navigates to the previous view if is true. /// Task NavigateBack(); /// /// Navigates to the previous view.. /// RelayCommand NavigateBackCommand { get; } /// /// Navigates to the specified full path in command parameter. /// RelayCommand NavigateToCommand { get; } /// /// Navigates to the specified PPC view. /// /// The view. Task NavigateTo(NavigationView view, bool pushToHistory = true); /// /// Navigates to the specified PPC view with the specified receive object. /// /// The view. Task NavigateWithObject(NavigationView view, TPass obj, bool pushToHistory = true); /// /// Navigates to the specified module. /// /// Task NavigateTo(bool pushToHistory = true) where T : IPPCModule; /// /// Navigates to the specified module using the view path (e.g MainView.JobsView). /// /// /// The view path. Task NavigateTo(String viewPath, bool pushToHistory = true) where T : IPPCModule; /// /// 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)); /// /// /// The view path. Task NavigateTo(bool pushToHistory = true, params String[] viewPath) where T : IPPCModule; /// /// Navigates to the specified module and view by full path (e.g Jobs.JobsView). /// /// The full path. Task NavigateTo(String fullPath, bool pushToHistory = true, Action onNavigating = null, Action onNavigated = null); /// /// Navigates to the specified module and view with the specified object and expecting a return parameter. /// The view must be of type INavigationResultProvider. /// /// The full path. Task NavigateForResult(TPass obj, bool pushToHistory = true) where TModule : IPPCModule; /// /// Navigates to the specified module and view with the specified object. /// /// The type of the module. /// The type of the view. /// The type of the pass. /// The object. /// if set to true [push to history]. /// Task NavigateWithObject(TPass obj, bool pushToHistory = true) where TModule : IPPCModule; /// /// Clears the navigation back history. /// void ClearHistory(); /// /// Clears the navigation back history except the specified view type. /// void ClearHistoryExcept(); } }