Ejemplo n.º 1
0
        public static string ToConfig(UserControl userControl, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender, bool registerResources)
        {
            List <AbstractComponent> cmps = new List <AbstractComponent>();

            if (userControl is IDynamicUserControl)
            {
                ((IDynamicUserControl)userControl).BeforeRender();
            }

            foreach (object control in userControl.Controls)
            {
                AbstractComponent cmp = control as AbstractComponent;

                if (cmp != null)
                {
                    cmps.Add(cmp);
                }
                else if (control is UserControlLoader)
                {
                    cmps.AddRange(((UserControlLoader)control).Components);
                }
                else if (control is LiteralControl || control is Literal)
                {
                    continue;
                }
                else
                {
                    throw new Exception(string.Format(ServiceMessages.NON_LAYOUT_CONTROL, control.GetType().ToString()));
                }
            }

            return(ComponentLoader.ToConfig(cmps, componentPreRender, registerResources));
        }
Ejemplo n.º 2
0
 public static string ToConfig(UserControl userControl)
 {
     return(ComponentLoader.ToConfig(userControl, null));
 }
Ejemplo n.º 3
0
 public static void Render(UserControl userControl, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender, bool registerResources)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(userControl, componentPreRender, registerResources));
 }
Ejemplo n.º 4
0
 public static string ToConfig(string path, string userControlId, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender, bool registerResources)
 {
     return(ComponentLoader.ToConfig(UserControlRenderer.LoadControl(path, userControlId), componentPreRender, registerResources));
 }
Ejemplo n.º 5
0
 public static string ToConfig(string path, string userControlId, bool registerResources)
 {
     return(ComponentLoader.ToConfig(UserControlRenderer.LoadControl(path, userControlId), registerResources));
 }
Ejemplo n.º 6
0
 public static string ToConfig(string path, string userControlId)
 {
     return(ComponentLoader.ToConfig(UserControlRenderer.LoadControl(path, userControlId)));
 }
Ejemplo n.º 7
0
 public static string ToConfig(string path, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender)
 {
     return(ComponentLoader.ToConfig(UserControlRenderer.LoadControl(path), componentPreRender));
 }
Ejemplo n.º 8
0
 public static void Render(AbstractComponent component)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(component, true));
 }
Ejemplo n.º 9
0
 public static string ToConfig(IEnumerable <AbstractComponent> components, bool registerResources)
 {
     return(ComponentLoader.ToConfig(components, null, registerResources));
 }
Ejemplo n.º 10
0
 public static string ToConfig(IEnumerable <AbstractComponent> components)
 {
     return(ComponentLoader.ToConfig(components, null));
 }
Ejemplo n.º 11
0
 public static void Render(IEnumerable <AbstractComponent> components, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender, bool registerResources)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(components, componentPreRender, registerResources));
 }
Ejemplo n.º 12
0
 public static void Render(IEnumerable <AbstractComponent> components, bool registerResources)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(components, registerResources));
 }
Ejemplo n.º 13
0
 public static string ToConfig(AbstractComponent component, bool registerResources)
 {
     return(ComponentLoader.ToConfig(new AbstractComponent[] { component }, registerResources));
 }
Ejemplo n.º 14
0
 public static string ToConfig(AbstractComponent component)
 {
     return(ComponentLoader.ToConfig(new AbstractComponent[] { component }, true));
 }
Ejemplo n.º 15
0
 public static void Render(AbstractComponent component, bool registerResources)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(component, registerResources));
 }
Ejemplo n.º 16
0
 public static string ToConfig(UserControl userControl, bool registerResources)
 {
     return(ComponentLoader.ToConfig(userControl, null, registerResources));
 }
Ejemplo n.º 17
0
 public static string ToConfig(UserControl userControl, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender)
 {
     return(ComponentLoader.ToConfig(userControl, componentPreRender, true));
 }
Ejemplo n.º 18
0
 public static string ToConfig(IEnumerable <AbstractComponent> components, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender)
 {
     return(ComponentLoader.ToConfig(components, componentPreRender, true));
 }