private string GetCtr(Plugin plugin) { if (plugin is GenericPlugin && !string.IsNullOrEmpty(((GenericPlugin)plugin).InstanceOf)) { GenericPlugin gp = (GenericPlugin)plugin; return(string.Concat("new ", gp.InstanceOf, "(", gp.CustomConfig.ToJson(), ")")); } else if (plugin is OuterPlugin) { return(string.Concat("this.", plugin.ClientID)); } return(plugin.GetClientConstructor(true, null)); }
protected override void OnPreRender(EventArgs e) { if (!Ext.IsAjaxRequest) { if (this.Plugins.Count > 0) { foreach (Plugin plugin in this.Plugins) { if (plugin is GenericPlugin) { GenericPlugin gp = (GenericPlugin)plugin; if (!string.IsNullOrEmpty(gp.Path)) { this.ScriptManager.RegisterClientScriptInclude(plugin.ClientID, this.ResolveUrl(gp.Path)); } } } } } base.OnPreRender(e); }