Пример #1
0
        public override List <Control> DisplayConfiguration(Control parentControl)
        {
            var            controls       = new List <Control>();
            WidgityControl widgityControl = new WidgityControl
            {
                ID = this.Id + "_widgityControl"
            };

            parentControl.Controls.Add(widgityControl);
            controls.Add(widgityControl);
            return(controls);
        }
Пример #2
0
 /// <summary>
 /// Raises the <see cref="E:System.Web.UI.Control.Init" /> event.
 /// </summary>
 /// <param name="e">An <see cref="T:System.EventArgs" /> object that contains the event data.</param>
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     if (Page.IsPostBack)
     {
         widgityControl = new WidgityControl
         {
             ID           = ID = this.ID + "_widgityControl",
             EntityTypeId = EntityTypeCache.Get(typeof(Block)).Id,
             EntityGuid   = BlockCache.Guid,
         };
         phPlaceholder.Controls.Add(widgityControl);
     }
 }
Пример #3
0
        public override List <Control> DisplayCoursePage(CoursePage coursePage, Control parentControl)
        {
            {
                var            controls       = new List <Control>();
                WidgityControl widgityControl = new WidgityControl
                {
                    ID = this.Id + "_widgityControl"
                };
                parentControl.Controls.Add(widgityControl);
                controls.Add(widgityControl);

                widgityControl.EntityTypeId = EntityTypeCache.GetId(typeof(CoursePage)).Value;
                widgityControl.EntityGuid   = coursePage.Guid;
                widgityControl.DataBind();

                return(controls);
            }
        }