Пример #1
0
 /// <summary>
 /// Creates a HostedControlsNavigator.
 /// </summary>
 /// <param name="name">The name of the navigator from the configuration file.</param>
 public UserControlsNavigator(string name)
 {
     Name        = name;
     _settings   = UIPConfiguration.Config.GetHostedControlsSettings(name);
     ViewManager = ViewManagerFactory.Create(name);
     SetState(StateFactory.Create(name));
 }
Пример #2
0
 private void LoadHostedControls(XmlNode configNode)
 {
     foreach (XmlNode hostedControlsNode in configNode.SelectNodes(UserControlsXPath))
     {
         UserControlsSettings settings = new UserControlsSettings(hostedControlsNode);
         _navigatorCollection.Add(settings.Name, settings);
     }
 }
Пример #3
0
        /// <summary>
        /// Returns the settings for hosted controls.
        /// </summary>
        /// <param name="hostedControlsName">The name of the hosted controls element.</param>
        /// <returns>The settings.</returns>
        public UserControlsSettings GetHostedControlsSettings(string hostedControlsName)
        {
            UserControlsSettings settings = (UserControlsSettings)_navigatorCollection[hostedControlsName];

            if (settings == null)
            {
                throw new UIPException(Resource.ResourceManager.FormatMessage(Resource.Exceptions.RES_ExceptionHostedControlsNotFound, hostedControlsName));
            }
            return(settings);
        }
Пример #4
0
        /// <summary>
        /// Checks if a hosted controls element exists.
        /// </summary>
        /// <param name="hostedControlsName">The name of the element to check for.</param>
        /// <returns></returns>
        public bool ContainsHostedControlsSettings(string hostedControlsName)
        {
            UserControlsSettings settings = (UserControlsSettings)_navigatorCollection[hostedControlsName];

            return(settings != null);
        }