Exemplo n.º 1
0
        private void NewPanel()
        {
            if (this.panStack.Count > 0)
            {
                this.panStack[panStack.Count - 1].setButAddView(false);
            }

            CMultiFilterPanel tmp = new CMultiFilterPanel();

            tmp.setAddFilterPanelDel(new CMultiFilterPanel.AddFilterPanelTyp(this.NewPanel));
            tmp.setRemoveFilterPanelDel(new CMultiFilterPanel.RemoveFilterPanelTyp(this.RemoveFilterPanel));
            this.panStack.Add(tmp);
            this.Controls.Add(tmp);
            tmp.Dock = DockStyle.Top;
            this.Refresh();

            //TabIndex bei allen PanelForm korigieren
            int index = panStack.Count - 1;

            foreach (CMultiFilterPanel pan in this.panStack)
            {
                pan.TabIndex = index--;
            }

            //this.Size = new Size(this.Size.Width, this.Size.Height + tmp.Size.Height);
            tmp.Focus();
        }
Exemplo n.º 2
0
 private void RemoveFilterPanel(CMultiFilterPanel panel)
 {
     if (panel != null && this.panStack.Count > 1)
     {
         //this.Size = new Size(this.Size.Width, this.Size.Height - panel.Size.Height);
         this.Controls.Remove(panel);
         this.panStack.Remove(panel);
         this.panStack[panStack.Count - 1].setButAddView(true);
         this.panStack[panStack.Count - 1].Focus();
     }
 }