Beispiel #1
0
        internal void OnClose(object sender, EventArgs e)
        {
            // If there anything to close? (or the control has been set to generate event always)
            if ((_tabControl.TabPages.Count > 0) || _tabbedGroups.PageCloseWhenEmpty)
            {
                TGCloseRequestEventArgs tge = new TGCloseRequestEventArgs(this, _tabControl, _tabControl.SelectedTab);

                // Generate event so handlers can perform appropriate action
                _tabbedGroups.OnPageCloseRequested(tge);

                // Still want to close the page? (and there is something to close)
                if (!tge.Cancel && (_tabControl.TabPages.Count > 0))
                {
                    _tabControl.TabPages.Remove(_tabControl.SelectedTab);
                }
            }
        }
Beispiel #2
0
 public virtual void OnPageCloseRequested(TGCloseRequestEventArgs e)
 {
     // Has anyone registered for the event?
     if (PageCloseRequest != null)
         PageCloseRequest(this, e);
         
 }
        internal void OnClose(object sender, EventArgs e)
        {
            TGCloseRequestEventArgs tge = new TGCloseRequestEventArgs(this, _tabControl, _tabControl.SelectedTab);

            // Generate event so handlers can perform appropriate action
            _tabbedGroups.OnPageCloseRequested(tge);

            // Still want to close the page?
            if (!tge.Cancel)
                _tabControl.TabPages.Remove(_tabControl.SelectedTab);
        }
Beispiel #4
0
		public virtual void OnPageCloseRequested(TGCloseRequestEventArgs e) {
			// Has anyone registered for the event?
			if (PageCloseRequest != null)
				PageCloseRequest(this, e);
                
		}
Beispiel #5
0
 private void m_tabs_PageCloseRequest(Crownwood.Magic.Controls.TabbedGroups tg, Crownwood.Magic.Controls.TGCloseRequestEventArgs e)
 {
     if (m_tabs.RootSequence.Count == 1)
     {
         TabGroupLeaf leaf = m_tabs.FirstLeaf();
         if (leaf.TabPages.Count == 1)
         {
             CFormAlerte.Afficher(I.T("Impossible to close the unique thumbnail of the application|100"), EFormAlerteType.Erreur);
             e.Cancel = true;
         }
         else
         {
             e.Cancel = false;
         }
     }
 }
Beispiel #6
0
        internal void OnClose(object sender, EventArgs e)
        {
            // If there anything to close? (or the control has been set to generate event always)
            if ((_tabControl.TabPages.Count > 0) || _tabbedGroups.PageCloseWhenEmpty)
            {
                TGCloseRequestEventArgs tge = new TGCloseRequestEventArgs(this, _tabControl, _tabControl.SelectedTab);

                // Generate event so handlers can perform appropriate action
                _tabbedGroups.OnPageCloseRequested(tge);

                // Still want to close the page? (and there is something to close)
                if (!tge.Cancel && (_tabControl.TabPages.Count > 0))
                    _tabControl.TabPages.Remove(_tabControl.SelectedTab);
            }
        }