/// <summary> /// Handles any StartTask events raised by a controller. /// </summary> /// <param name="sender">Controller that raised the event.</param> /// <param name="e">Arguments used by the event handler.</param> public virtual void OnStartTask(object sender, StartTaskEventArgs e) { if (UIPConfiguration.Config.ContainsNavigationGraphSettings(e.NextNavigationGraph)) { NavigationGraphSettings settings = UIPConfiguration.Config.GetNavigationGraphSettings(e.NextNavigationGraph); if (settings.RunInWizardMode) { WizardNavigator navigator = new WizardNavigator(e.NextNavigationGraph); navigator.StartTask(e.NextTask, e.TaskArguments); } else { GraphNavigator navigator = new GraphNavigator(e.NextNavigationGraph); navigator.StartTask(e.NextTask, e.TaskArguments); } return; } else if (UIPConfiguration.Config.ContainsHostedControlsSettings(e.NextNavigationGraph)) { UserControlsNavigator navigator = new UserControlsNavigator(e.NextNavigationGraph); navigator.StartTask(e.NextTask); return; } OpenNavigator newNavigator = new OpenNavigator("new"); newNavigator.StartTask(e.NextNavigationGraph, e.NextTask); }
/// <summary> /// Starts a UIProcess for open navigation. /// </summary> /// <param name="name">The name of the navigationGraph element in app.config.</param> /// <param name="firstViewName">The first view to be activated.</param> /// <param name="task">The task name.</param> public static void StartOpenNavigationTask(string name, string firstViewName, ITask task) { OpenNavigator navigator = new OpenNavigator(name); navigator.StartTask(firstViewName, task); }
/// <summary> /// Starts a UIProcess for open navigation. /// </summary> /// <param name="name">The name of the navigationGraph element in app.config.</param> /// <param name="taskId">The task identifier (a GUID associated with the task).</param> public static void StartOpenNavigationTask(string name, Guid taskId) { OpenNavigator navigator = new OpenNavigator(name); navigator.StartTask(taskId); }