protected override void OnPreRender(EventArgs e) { // A call to the ResourceDispatcher to get have the automatic resources dispatched ResourceDispatcher.Dispatch(this, ResourceManagerUtility.GetResourceManager(this)); base.OnPreRender(e); HtmlHeadAppender.Current.RegisterPageStylesheetLink(); var key = GetType().FullName + "_Global"; if (!HtmlHeadAppender.Current.IsRegistered(key)) { HtmlHeadAppender.Current.RegisterStylesheetLink(key, "Html/global.css"); } LiteralControl stack = new LiteralControl(); StringBuilder sb = new StringBuilder(); sb.Append("<br /><div>"); sb.Append("<b>Stack:</b><br />"); for (WxeStep step = CurrentPageStep; step != null; step = step.ParentStep) { sb.AppendFormat("{0}<br />", step.ToString()); } sb.Append("</div>"); stack.Text = sb.ToString(); WxeControls.Add(stack); }
/// <summary> Overrides the <see cref="Control.OnPreRender"/> method. </summary> protected override void OnPreRender(EventArgs e) { EnsureSubMenuTabStripPopulated(); foreach (MenuTab menuTab in Tabs) { if (menuTab.Command != null && menuTab.Command.Type == CommandType.Event) { menuTab.Command.RegisterForSynchronousPostBackOnDemand( _mainMenuTabStrip, menuTab.ItemID, string.Format("TabbedMenu '{0}', MenuTab '{1}'", ID, menuTab.ItemID)); } } if (SelectedMainMenuTab != null) { foreach (MenuTab menuTab in SelectedMainMenuTab.SubMenuTabs) { if (menuTab.Command != null && menuTab.Command.Type == CommandType.Event) { menuTab.Command.RegisterForSynchronousPostBackOnDemand( _subMenuTabStrip, menuTab.ItemID, string.Format("TabbedMenu '{0}', MainMenuTab '{1}', SubMenuTab '{2}'", ID, SelectedMainMenuTab.ItemID, menuTab.ItemID)); } } } base.OnPreRender(e); SaveSelection(); IResourceManager resourceManager = ResourceManagerUtility.GetResourceManager(this, true) ?? NullResourceManager.Instance; LoadResources(resourceManager); }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); var resourceManager = ResourceManagerUtility.GetResourceManager(this, true); LoadResources(resourceManager); }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); HtmlHeadAppender.Current.RegisterPageStylesheetLink(); // A call to the ResourceDispatcher to get have the automatic resources dispatched ResourceDispatcher.Dispatch(this, ResourceManagerUtility.GetResourceManager(this)); }
protected override void OnPreRender(EventArgs e) { ResourceDispatcher.Dispatch(this, ResourceManagerUtility.GetResourceManager(this)); if (!IsPostBack && InitialFocusControl != null) { SetFocus(InitialFocusControl); } base.OnPreRender(e); }
protected override void OnPreRender(EventArgs e) { EnsureTabsRestored(); base.OnPreRender(e); var resourceManager = ResourceManagerUtility.GetResourceManager(this, true); var globalizationService = SafeServiceLocator.Current.GetInstance <IGlobalizationService>(); LoadResources(resourceManager, globalizationService); }
protected override void OnPreRender(EventArgs e) { if (!CurrentFunction.TenantHandle.Equals(CurrentTenantHandle)) { CurrentTenantHandle = CurrentFunction.TenantHandle; _hasTenantChanged = true; } ResourceDispatcher.Dispatch(this, ResourceManagerUtility.GetResourceManager(this)); base.OnPreRender(e); }
// constants // types // static members public static object GetResourceString(Control parent, string resourceID) { ArgumentUtility.CheckNotNull("parent", parent); ArgumentUtility.CheckNotNullOrEmpty("resourceID", resourceID); IResourceManager resourceManager = ResourceManagerUtility.GetResourceManager(parent, true); if (resourceManager == null) { throw new InvalidOperationException("Remotion.Web.Compilation.ResourceExpressionBuilder can only be used on controls embedded within a parent implementing IObjectWithResources."); } return(resourceManager.GetString(resourceID)); }
protected void Page_Load(object sender, EventArgs e) { Title = ResourceManagerUtility.GetResourceManager(this).GetString("Edit~$DOMAIN_CLASSNAME$"); if (!IsPostBack) { if (obj == null) { obj = $DOMAIN_CLASSNAME$.NewObject(); } } LoadObject(obj); } // END Page_Load
/// <summary> Find the <see cref="IResourceManager"/> for this control. </summary> /// <param name="localResourcesType"> /// A type with the <see cref="MultiLingualResourcesAttribute"/> applied to it. Typically an <b>enum</b> or the derived class itself. /// </param> /// <returns>An <see cref="IResourceManager"/> from which all resources for this control can be obtained.</returns> protected IResourceManager GetResourceManager(Type localResourcesType) { ArgumentUtility.CheckNotNull("localResourcesType", localResourcesType); return(_resourceManagerCache.GetOrCreateValue( Tuple.Create(localResourcesType, NamingContainer), key => { var localResourceManager = GlobalizationService.GetResourceManager(localResourcesType); var namingContainerResourceManager = ResourceManagerUtility.GetResourceManager(NamingContainer, true); return ResourceManagerSet.Create(namingContainerResourceManager, localResourceManager); })); }
protected override void OnPreRender(EventArgs e) { // A call to the ResourceDispatcher to get have the automatic resources dispatched ResourceDispatcher.Dispatch(this, ResourceManagerUtility.GetResourceManager(this)); HtmlHeadAppender.Current.RegisterPageStylesheetLink(); var key = GetType().FullName + "_Global"; if (!HtmlHeadAppender.Current.IsRegistered(key)) { string href = ResolveClientUrl("~/Html/global.css"); HtmlHeadAppender.Current.RegisterStylesheetLink(key, href); } base.OnPreRender(e); }
/// <summary> /// Find the <see cref="IResourceManager"/> for this <see cref="ValidationStateViewer"/>. /// </summary> /// <returns></returns> protected IResourceManager GetResourceManager() { // Provider has already been identified. if (_cachedResourceManager != null) { return(_cachedResourceManager); } // Get the resource managers IResourceManager localResourceManager = GlobalizationService.GetResourceManager(typeof(ResourceIdentifier)); IResourceManager namingContainerResourceManager = ResourceManagerUtility.GetResourceManager(NamingContainer, true); _cachedResourceManager = ResourceManagerSet.Create(namingContainerResourceManager, localResourceManager); return(_cachedResourceManager); }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); IResourceManager resourceManager = ResourceManagerUtility.GetResourceManager(this, true) ?? NullResourceManager.Instance; LoadResources(resourceManager); if (_isDefaultButton && Page != null && string.IsNullOrEmpty(Page.Form.DefaultButton)) { Page.Form.DefaultButton = UniqueID; } if (Page != null) { Page.PreRenderComplete += Page_PreRenderComplete; } }
/// <summary> Find the <see cref="IResourceManager"/> for this control info. </summary> /// <param name="localResourcesType"> /// A type with the <see cref="MultiLingualResourcesAttribute"/> applied to it. /// Typically an <b>enum</b> or the derived class itself. /// </param> protected IResourceManager GetResourceManager(Type localResourcesType) { ArgumentUtility.CheckNotNull("localResourcesType", localResourcesType); // Provider has already been identified. if (_cachedResourceManager != null) { return(_cachedResourceManager); } // Get the resource managers var localResourceManager = GlobalizationService.GetResourceManager(localResourcesType); var pageResourceManager = ResourceManagerUtility.GetResourceManager(_page.WrappedInstance, true); _cachedResourceManager = ResourceManagerSet.Create(pageResourceManager, localResourceManager); return(_cachedResourceManager); }
/// <summary> Find the <see cref="IResourceManager"/> for this control. </summary> /// <param name="localResourcesType"> /// A type with the <see cref="MultiLingualResourcesAttribute"/> applied to it. /// Typically an <b>enum</b> or the derived class itself. /// </param> protected IResourceManager GetResourceManager(Type localResourcesType) { //Remotion.Utilities.ArgumentUtility.CheckNotNull ("localResourcesType", localResourcesType); // Provider has already been identified. if (_cachedResourceManager != null) { return(_cachedResourceManager); } // Get the resource managers var localResourceManager = GlobalizationService.GetResourceManager(localResourcesType); var namingContainerResourceManager = ResourceManagerUtility.GetResourceManager(NamingContainer, true); _cachedResourceManager = ResourceManagerSet.Create(namingContainerResourceManager, localResourceManager); return(_cachedResourceManager); }
protected override void OnPreRender(EventArgs e) { var themedResourceUrlResolver = SafeServiceLocator.Current.GetInstance <IThemedResourceUrlResolverFactory> ().CreateResourceUrlResolver(); string url = themedResourceUrlResolver.GetResourceUrl(this, ResourceType.Html, "Style.css"); Remotion.Web.UI.HtmlHeadAppender.Current.RegisterStylesheetLink(GetType() + "remotionstyle", url); url = ResolveClientUrl("~/Html/style.css"); Remotion.Web.UI.HtmlHeadAppender.Current.RegisterStylesheetLink(GetType() + "projectstyle", url); // globalization IResourceManager rm = ResourceManagerUtility.GetResourceManager(this); if (rm != null) { ResourceDispatcher.Dispatch(this, rm); } base.OnPreRender(e); }
private void Page_Load(object sender, System.EventArgs e) { Title = ResourceManagerUtility.GetResourceManager(this).GetString("SearchResult~$DOMAIN_CLASSNAME$"); } // END Page_Load