Пример #1
0
 /// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Method[@name="OnInit"]/*'/>
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     if (null != CloneFrom && string.Empty != CloneFrom.Trim())
     {
         AspNetPager ctrl = Parent.FindControl(CloneFrom) as AspNetPager;
         if (null == ctrl)
         {
             string errStr = SR.GetString("def_CloneFromTypeError");
             throw new ArgumentException(errStr.Replace("%controlID%", CloneFrom), "CloneFrom");
         }
         if (null != ctrl.cloneFrom && this == ctrl.cloneFrom)
         {
             string errStr = SR.GetString("def_RecursiveCloneFrom");
             throw new ArgumentException(errStr, "CloneFrom");
         }
         cloneFrom       = ctrl;
         CssClass        = cloneFrom.CssClass;
         Width           = cloneFrom.Width;
         Height          = cloneFrom.Height;
         HorizontalAlign = cloneFrom.HorizontalAlign;
         BackColor       = cloneFrom.BackColor;
         BackImageUrl    = cloneFrom.BackImageUrl;
         BorderColor     = cloneFrom.BorderColor;
         BorderStyle     = cloneFrom.BorderStyle;
         BorderWidth     = cloneFrom.BorderWidth;
         Font.CopyFrom(cloneFrom.Font);
         ForeColor       = cloneFrom.ForeColor;
         EnableViewState = cloneFrom.EnableViewState;
         Enabled         = cloneFrom.Enabled;
     }
 }
Пример #2
0
        /// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Method[@name="GetDesignTimeHtml"]/*'/>
        public override string GetDesignTimeHtml()
        {
            wb             = (AspNetPager)Component;
            wb.RecordCount = 225;
            StringWriter   sw     = new StringWriter();
            HtmlTextWriter writer = new HtmlTextWriter(sw);

            wb.RenderControl(writer);
            return(sw.ToString());
        }
Пример #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="component"></param>
 public AspNetPagerActionList(IComponent component)
     : base(component)
 {
     pager = component as AspNetPager;
     svc   = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
 }