Exemplo n.º 1
0
        /// <summary>
        /// Creates the specific NavigationController of the '_Auto_' Navigation pattern.
        /// </summary>
        /// <param name="parentController">Parent controller.</param>
        /// <returns>Specific NavigationController of the '_Auto_' Navigation pattern.</returns>
        public static NavigationController Navigation__Auto_(IUController parentController)
        {
            // Navigation _Auto_.
            NavigationController lNavigationController = new NavigationController("_Auto_", parentController);

            string[] lAgentsNavigationItem0 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem0 = new List<KeyValuePair<string, string[]>>();
            lNavigationController.Add(
                0,
                "PasajeroAeronave",
                "Clas_1348178542592658NavOfer_AutoElemNav_1_Alias",
                lAgentsNavigationItem0,
                "PasajeroAeronave",
                typeof(InteractionToolkit.PasajeroAeronave.IUInstances.IIU_PasajeroAeronaveIT).FullName,
                "Pasajero",
                "",
                "PasajeroAeronave",
                "Clas_1348178542592177UIInst_2",
                "Pasajero",
                "Clas_1348178542592658",
                "",
                lAttrActivationItem0,
                "");

            return lNavigationController;
        }
        /// <summary>
        /// Initializes a new instance of the 'NavigationItemController' class.
        /// </summary>
        /// <param name="number">Number of the Navigation Item.</param>
        /// <param name="alias">Alias of the Navigation Item.</param>
        /// <param name="idXML">IdXML of the Navigation Item.</param>
        /// <param name="agents">List of agents that can acces to the Navigation Item.</param>
        /// <param name="classIUName">Class name of the Navigation Item.</param>
        /// <param name="iuName">Interaction unit name of the Navigation Item.</param>
        /// <param name="rolePath">Role path of the Navigation Item.</param>
        /// <param name="navigationalFilteringIdentity">Navigational filtering identifier.</param>
        /// <param name="parent">Parent controller.</param>
        /// <param name="targetScenarioAlias">Alias of the Target scenario</param>
        /// <param name="idXMLTargetScenarioAlias">IdXML of the Target scenario</param>
        /// <param name="instanceAlias">Selected instance Alias</param>
        /// <param name="idXMLInstanceAlias">IdXML selected instance Alias</param>
        /// <param name="displaySetToTargetScenario">Display Set to be shown in the target scenario. Attributes separates by commas</param>
        /// <param name="attributesListForFormulas">List of attributes needed for evaluating the enabling/disabling formulas.</param>
        public NavigationItemController(
			int number,
			string alias,
			string idXML,
			List<string> agents,
			string classIUName,
			string iuName,
			string rolePath,
			string navigationalFilteringIdentity,
			string targetScenarioAlias,
			string idXMLTargetScenarioAlias,
			string instanceAlias,
			string idXMLInstanceAlias,
			string displaySetToTargetScenario,
			List<string> attributesListForFormulas,
			NavigationController parent,
			string alternateKeyName)
            : base(parent)
        {
            mNumber = number;
            mAlias = alias;
            mIdXML = idXML;
            mAgents = agents;
            ClassIUName = classIUName;
            IUName = iuName;
            RolePath = rolePath;
            NavigationalFilteringIdentity = navigationalFilteringIdentity;
            TargetScenarioAlias = targetScenarioAlias;
            IdXMLTargetScenarioAlias = idXMLTargetScenarioAlias;
            InstanceAlias = instanceAlias;
            IdXMLInstanceAlias = idXMLInstanceAlias;
            DisplaySet2TargetScenario = displaySetToTargetScenario;
            AlternateKeyName = alternateKeyName;

            // Build the attributes for enabling/disabling formulas (comma-sepatated string).
            if (attributesListForFormulas != null)
            {
                StringBuilder lAttributes = new StringBuilder();
                foreach (string lItem in attributesListForFormulas)
                {
                    lAttributes.Append(lItem);
                    lAttributes.Append(',');
                }
                // Remove the last comma.
                if (lAttributes.Length > 0)
                {
                    lAttributes.Length--;
                }

                NavigationItemAttributesForFormulas = lAttributes.ToString();
            }
        }
 /// <summary>
 /// Enable or disable navigations depending if dataTable have instances or not.
 /// </summary>
 /// <param name="navigation">Navigation Controllers</param>
 /// <param name="dataTable">DataTable with instances queried.</param>
 protected virtual void ConfigureNavigations(NavigationController navigation, DataTable dataTable)
 {
     // Enable or disable Navigation items depending on the data.
     if (navigation != null)
     {
         if ((dataTable == null) || (dataTable.Rows.Count == 0))
         {
             foreach (NavigationItemController lNavigationItem in navigation.NavigationItems.Values)
             {
                 lNavigationItem.Trigger.Enabled = false;
             }
         }
         else
         {
             foreach (NavigationItemController lNavigationItem in navigation.NavigationItems.Values)
             {
                 lNavigationItem.Trigger.Enabled = true;
             }
         }
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Creates the specific NavigationController of the '_Auto_' Navigation pattern.
        /// </summary>
        /// <param name="parentController">Parent controller.</param>
        /// <returns>Specific NavigationController of the '_Auto_' Navigation pattern.</returns>
        public static NavigationController Navigation__Auto_(IUController parentController)
        {
            // Navigation _Auto_.
            NavigationController lNavigationController = new NavigationController("_Auto_", parentController);

            string[] lAgentsNavigationItem0 = { Agents.Administrador };
            List<KeyValuePair<string, string[]>> lAttrActivationItem0 = new List<KeyValuePair<string, string[]>>();
            lNavigationController.Add(
                0,
                "RevisionPasajero",
                "Clas_1348178542592347NavOfer_AutoElemNav_1_Alias",
                lAgentsNavigationItem0,
                "RevisionPasajero",
                typeof(InteractionToolkit.RevisionPasajero.IUInstances._Auto_IT).FullName,
                "Revision",
                "",
                "RevisionPasajero",
                "Clas_1348178673664478UIInst_1",
                "Revision",
                "Clas_1348178542592347",
                "",
                lAttrActivationItem0,
                "");

            return lNavigationController;
        }