Пример #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));
        }
Пример #2
0
 public static string ToConfig(UserControl userControl)
 {
     return(ComponentLoader.ToConfig(userControl, null));
 }
Пример #3
0
 public static void Render(UserControl userControl, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender, bool registerResources)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(userControl, componentPreRender, registerResources));
 }
Пример #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));
 }
Пример #5
0
 public static string ToConfig(string path, string userControlId, bool registerResources)
 {
     return(ComponentLoader.ToConfig(UserControlRenderer.LoadControl(path, userControlId), registerResources));
 }
Пример #6
0
 public static string ToConfig(string path, string userControlId)
 {
     return(ComponentLoader.ToConfig(UserControlRenderer.LoadControl(path, userControlId)));
 }
Пример #7
0
 public static string ToConfig(string path, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender)
 {
     return(ComponentLoader.ToConfig(UserControlRenderer.LoadControl(path), componentPreRender));
 }
Пример #8
0
 public static void Render(AbstractComponent component)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(component, true));
 }
Пример #9
0
 public static string ToConfig(IEnumerable <AbstractComponent> components, bool registerResources)
 {
     return(ComponentLoader.ToConfig(components, null, registerResources));
 }
Пример #10
0
 public static string ToConfig(IEnumerable <AbstractComponent> components)
 {
     return(ComponentLoader.ToConfig(components, null));
 }
Пример #11
0
 public static void Render(IEnumerable <AbstractComponent> components, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender, bool registerResources)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(components, componentPreRender, registerResources));
 }
Пример #12
0
 public static void Render(IEnumerable <AbstractComponent> components, bool registerResources)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(components, registerResources));
 }
Пример #13
0
 public static string ToConfig(AbstractComponent component, bool registerResources)
 {
     return(ComponentLoader.ToConfig(new AbstractComponent[] { component }, registerResources));
 }
Пример #14
0
 public static string ToConfig(AbstractComponent component)
 {
     return(ComponentLoader.ToConfig(new AbstractComponent[] { component }, true));
 }
Пример #15
0
 public static void Render(AbstractComponent component, bool registerResources)
 {
     CompressionUtils.GZipAndSend(ComponentLoader.ToConfig(component, registerResources));
 }
Пример #16
0
 public static string ToConfig(UserControl userControl, bool registerResources)
 {
     return(ComponentLoader.ToConfig(userControl, null, registerResources));
 }
Пример #17
0
 public static string ToConfig(UserControl userControl, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender)
 {
     return(ComponentLoader.ToConfig(userControl, componentPreRender, true));
 }
Пример #18
0
 public static string ToConfig(IEnumerable <AbstractComponent> components, Ext.Net.UserControlLoader.ComponentAddedEventHandler componentPreRender)
 {
     return(ComponentLoader.ToConfig(components, componentPreRender, true));
 }