Esempio n. 1
0
        //-----------------------------------------------------------------
        public bool QueryClose()
        {
            ArrayList lst = new ArrayList(((Crownwood.Magic.Controls.TabControl)m_tabs.ActiveLeaf.GroupControl).TabPages);

            foreach (Crownwood.Magic.Controls.TabPage page in lst)
            {
                IFormNavigable form = page.Control as IFormNavigable;
                if (!form.QueryClose())
                {
                    return(false);
                }
            }
            return(true);
        }
Esempio n. 2
0
 private void CFormNavigateur_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.Cancel)
     {
         return;
     }
     foreach (Crownwood.Magic.Controls.TabPage page in ((Crownwood.Magic.Controls.TabControl)m_tabs.ActiveLeaf.GroupControl).TabPages)
     {
         IFormNavigable form = page.Control as IFormNavigable;
         if (!form.QueryClose())
         {
             e.Cancel = true;
             return;
         }
     }
 }
Esempio n. 3
0
 //---------------------------------------------------------------------------
 protected bool CloseForm(IFormNavigable form)
 {
     foreach (Crownwood.Magic.Controls.TabPage page in ((Crownwood.Magic.Controls.TabControl)m_tabs.ActiveLeaf.GroupControl).TabPages)
     {
         if (page.Control == form)
         {
             if (form.QueryClose())
             {
                 ((Crownwood.Magic.Controls.TabControl)m_tabs.ActiveLeaf.GroupControl).TabPages.Remove(page);
                 page.Dispose();
                 return(true);
             }
         }
     }
     return(false);
 }