Ejemplo n.º 1
0
        /// <summary>
        /// Starts a UIProcess for navigation.
        /// </summary>
        /// <param name="navGraph">The name of the navigationGraph element in app.config. </param>
        public static void StartNavigationTask(string navGraph)
        {
            NavigationGraphSettings navGraphSettings = UIPConfiguration.Config.GetNavigationGraphSettings(navGraph);
            GraphNavigator          navigator        = (navGraphSettings.RunInWizardMode) ? new WizardNavigator(navGraph) : new GraphNavigator(navGraph);

            navigator.StartTask();
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        private Navigator GetNavigator(string navigationGraphName, Guid taskId)
        {
            Navigator navigator = null;

            try
            {
                navigator = new GraphNavigator(navigationGraphName, taskId);
            }
            catch (UIPException)
            {
                navigator = new OpenNavigator(navigationGraphName, taskId);
            }

            return(navigator);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Starts a UIProcess for navigation.
        /// </summary>
        /// <param name="navGraph">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 StartNavigationTask(string navGraph, Guid taskId)
        {
            GraphNavigator navigator = new GraphNavigator(navGraph);

            navigator.StartTask(taskId, null);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Starts a UIProcess for navigation.
        /// </summary>
        /// <param name="navGraph">The name of the navigationGraph element in app.config.</param>
        /// <param name="task">The task name.</param>
        public static void StartNavigationTask(string navGraph, ITask task)
        {
            GraphNavigator navigator = new GraphNavigator(navGraph);

            navigator.StartTask(task, null);
        }