Esempio n. 1
0
        protected override void OnControlRemoved(ControlEventArgs e)
        {
            base.OnControlRemoved(e);
            JMImageItem xpanderPanel = e.Control as JMImageItem;

            xpanderPanel.Click -= new EventHandler(xpanderPanel_Click);
        }
Esempio n. 2
0
        int IList.Add(object value)
        {
            JMImageItem xpanderPanel = value as JMImageItem;

            if (xpanderPanel == null)
            {
                throw new ArgumentException();
            }
            this.Add(xpanderPanel);
            return(this.IndexOf(xpanderPanel));
        }
Esempio n. 3
0
        protected override void OnControlAdded(ControlEventArgs e)
        {
            base.OnControlAdded(e);
            JMImageItem xpanderPanel = e.Control as JMImageItem;

            if (xpanderPanel != null)
            {
                xpanderPanel.Parent = this;
                xpanderPanel.Dock   = DockStyle.Top;
                xpanderPanel.Height = itemheight;
                xpanderPanel.Click += new EventHandler(xpanderPanel_Click);
            }
            else
            {
                throw new InvalidOperationException("只能添加JMImageItem对象");
            }
        }
Esempio n. 4
0
        protected override Object CreateInstance(Type ItemType)
        {
            JMImageItem xpanderPanel = (JMImageItem)base.CreateInstance(ItemType);

            return(xpanderPanel);
        }
Esempio n. 5
0
 /// <summary>
 /// Inserts an XPanderPanel to the collection at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index at which value should be inserted. </param>
 /// <param name="xpanderPanel">The XPanderPanel to insert into the Collection.</param>
 public void Insert(int index, JMImageItem xpanderPanel)
 {
     ((IList)this).Insert(index, (object)xpanderPanel);
 }
Esempio n. 6
0
 /// <summary>
 /// Returns the index of the specified XPanderPanel in the collection.
 /// </summary>
 /// <param name="xpanderPanel">The xpanderPanel to find the index of.</param>
 /// <returns>The index of the xpanderPanel, or -1 if the xpanderPanel is not in the <see ref="ControlCollection">ControlCollection</see> instance.</returns>
 public int IndexOf(JMImageItem xpanderPanel)
 {
     return(this.m_controlCollection.IndexOf(xpanderPanel));
 }
Esempio n. 7
0
 /// <summary>
 /// Removes the first occurrence of a specific XPanderPanel from the XPanderPanelCollection
 /// </summary>
 /// <param name="value">The XPanderPanel to remove from the XPanderPanelCollection</param>
 public void Remove(JMImageItem xpanderPanel)
 {
     this.m_controlCollection.Remove(xpanderPanel);
 }
Esempio n. 8
0
 /// <summary>
 /// Adds a XPanderPanel to the collection.
 /// </summary>
 /// <param name="xpanderPanel">The XPanderPanel to add.</param>
 public void Add(JMImageItem xpanderPanel)
 {
     this.m_controlCollection.Add(xpanderPanel);
     m_xpanderPanelList.Invalidate();
 }