/// <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)); }
private void LoadHostedControls(XmlNode configNode) { foreach (XmlNode hostedControlsNode in configNode.SelectNodes(UserControlsXPath)) { UserControlsSettings settings = new UserControlsSettings(hostedControlsNode); _navigatorCollection.Add(settings.Name, settings); } }
/// <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); }
/// <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); }