Exemple #1
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);
        }
Exemple #2
0
        /// <summary>
        /// Starts a UIProcess for hosted controls.
        /// </summary>
        /// <param name="name">The name of the hostedControl element in app.config.</param>
        /// <param name="taskId">The task identifier (a GUID associated with the task).</param>
        /// <param name="args">Arguments to the view.</param>
        public static void StartUserControlsTask(string name, Guid taskId, TaskArgumentsHolder args)
        {
            UserControlsNavigator navigator = new UserControlsNavigator(name);

            navigator.StartTask(taskId, args);
        }