using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; namespace Tango.MachineStudio.Common.Navigation { /// /// Represents the Machine Studio views navigation manager. /// public interface INavigationManager { /// /// Gets the current module. /// IStudioModule CurrentModule { get; } /// /// Gets the current view model. /// StudioViewModel CurrentVM { get; } /// /// Gets a value indicating whether the navigation system is able to navigate to the previous view. /// bool CanNavigateBack { get; } /// /// 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 : IStudioModule; /// /// 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 : IStudioModule; /// /// 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 : IStudioModule; /// /// Navigates to the specified module and view by full path (e.g Jobs.JobsView). /// /// The full path. Task NavigateTo(String fullPath, bool pushToHistory = true); /// /// 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 : IStudioModule; /// /// 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 : IStudioModule; void NavigateToModule() where T : IStudioModule; /// /// Clears the navigation back history. /// void ClearHistory(); /// /// Clears the navigation back history except the specified view type. /// void ClearHistoryExcept(); } }