예제 #1
0
        internal bool IsPanelLast(ListBoxPanel panel)
        {
            if (m_Panels.Count == 0)
            {
                return(false);
            }

            return(m_Panels[m_Panels.Count - 1] == panel);
        }
예제 #2
0
        private void tableLayout_ControlRemoved(object sender, ControlEventArgs e)
        {
            ListBoxPanel panel = e.Control as ListBoxPanel;

            if (panel != null)
            {
                m_Panels.Remove(panel);
            }
        }
예제 #3
0
        protected void OnPanelAdd(ListBoxPanel panel)
        {
            panel.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
            this.tableLayout.Controls.Add(panel);
            // New rows will automatically be created
            panel.Width        = Width;
            panel.DoubleClick += new EventHandler(OnPanelDoubleClick);

            // Prevent flicker and the like
            using (new ControlRedrawLock(this.Parent))
            {
                // Brute force scrollbar update
                this.Width += 1;
                this.Width -= 1;
            }
        }
예제 #4
0
 public ItemChosenEventArgs(ListBoxPanel panel)
 {
     m_Panel = panel;
 }
예제 #5
0
        internal bool IsPanelLast(ListBoxPanel panel)
        {
            if (m_Panels.Count == 0) return false;

            return m_Panels[m_Panels.Count - 1] == panel;
        }
예제 #6
0
        protected void OnPanelAdd(ListBoxPanel panel)
        {
            panel.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
            this.tableLayout.Controls.Add(panel);
            // New rows will automatically be created
            panel.Width = Width;
            panel.DoubleClick += new EventHandler(OnPanelDoubleClick);

            // Prevent flicker and the like
            using (new ControlRedrawLock(this.Parent))
            {
                // Brute force scrollbar update
                this.Width += 1;
                this.Width -= 1;
            }
        }
예제 #7
0
 protected void OnPanelRemove(ListBoxPanel panel)
 {
     this.tableLayout.Controls.Remove(panel);
     Invalidate();
 }
예제 #8
0
 public ItemChosenEventArgs(ListBoxPanel panel)
 {
     m_Panel = panel;
 }
예제 #9
0
 protected void OnPanelRemove(ListBoxPanel panel)
 {
     this.tableLayout.Controls.Remove(panel);
     Invalidate();
 }
예제 #10
0
        private void m_Panels_PanelAdded(object sender, EventArgs e)
        {
            ListBoxPanel panel = sender as ListBoxPanel;

            OnPanelAdd(panel);
        }