Пример #1
0
 /// <summary>
 /// 在动态列表中添加一个条项目
 /// </summary>
 /// <param name="item"></param>
 public void AddItem(DynamicListItem item)
 {
     item.Visible = false;
     panelDynamicList.Controls.Add(item);
     item.Dock    = DockStyle.Top;
     item.Visible = true;
 }
Пример #2
0
        /// <summary>
        /// 在动态列表中创建一条项目
        /// </summary>
        /// <param name="title"></param>
        /// <param name="content"></param>
        /// <param name="tagText"></param>
        /// <param name="image"></param>
        /// <returns></returns>
        public DynamicListItem AddItem(string title, string content, string tagText, Image image)
        {
            DynamicListItem item = new DynamicListItem()
            {
                Title = title, Content = content, TagText = tagText, Image = image
            };

            AddItem(item);
            return(item);
        }