Ejemplo n.º 1
0
 private void mdiManager_TabDisplaying(object sender, MdiTabEventArgs e)
 {
     if (e.Tab.Key.Equals(MdiTabKeys.Search))
     {
         var p = (SearchPresenter)e.Tab.Tag;
         p.SetCurrentDatabase();
     }
 }
Ejemplo n.º 2
0
        protected override void OnTabActivated(MdiTabEventArgs e)
        {
            base.OnTabActivated(e);

            Control smartPart = this.GetSmartPart(e.Tab);

            if (null != smartPart)
            {
                this.Activate(smartPart);
            }
        }
Ejemplo n.º 3
0
            void OnTabDisplaying(object sender, MdiTabEventArgs e)
            {
                // unhook the event
                this.mdiManager.TabDisplaying -= new MdiTabEventHandler(this.OnTabDisplaying);

                MdiTabGroup tabGroup = this.GetTabGroup(this.mdiManager.TabGroups);

                // if there is no tab group with that name and this tab is in a
                // new tabgroup, name the tabgroup with the specified key
                if (tabGroup == null && e.Tab.TabGroup.Tabs.Count == 1)
                {
                    e.Tab.TabGroup.Key = this.groupKey;
                }
                else if (tabGroup != null)
                {
                    // if a tabgroup was specified, move it to that group
                    e.Tab.MoveToGroup(tabGroup);
                }
            }
Ejemplo n.º 4
0
        protected override void OnTabClosed(MdiTabEventArgs e)
        {
            base.OnTabClosed(e);

            // TODO handle - this could happen because they closed us or the programmer did

            // when the tab/form is closed then remove our
            // references to it. if the tab was just hidden
            // then we don't want to fire the closed event
            if (e.Tab.Form == null || e.Tab.Form.IsDisposed)
            {
                Control ctrl = this.GetSmartPart(e.Tab);

                if (null != ctrl)
                {
                    this.RemoveSmartPart(ctrl);
                }
            }
        }
Ejemplo n.º 5
0
 void PanelManager_MdiTabDoubleClick(object sender, MdiTabEventArgs e)
 {
     if(PropertyLib._AppProperties.TabDoubleClick2Close)   e.Tab.Form.Close();
 }
Ejemplo n.º 6
0
 private void PanelManager_MdiTabCreated(object sender, MdiTabEventArgs e)
 {
     PropertyLib._AppProperties.CurrentOpenning = Utility.sDbnull(e.Tab.Form.Tag, "-1");
     if (!lstTab.Contains(e.Tab.Form.Tag.ToString())) lstTab.Add(e.Tab.Form.Tag.ToString());
     if (!dic.ContainsKey(e.Tab.Form.Tag.ToString())) dic.Add(e.Tab.Form.Tag.ToString(), e.Tab);
 }
Ejemplo n.º 7
0
 private void PanelManager_MdiTabClick(object sender, MdiTabEventArgs e)
 {
     try
     {
         PropertyLib._AppProperties.CurrentOpenning = Utility.sDbnull(e.Tab.Form.Tag, "-1");
     }
     catch
     {
     }
 }
Ejemplo n.º 8
0
        //
        // Event Handlers
        //

        private void mdiManager_InitializeTab(object sender, MdiTabEventArgs e)
        {
            e.Tab.Key = e.Tab.Form.Text;
            e.Tab.Tag = e.Tab.Form.Tag;
        }
Ejemplo n.º 9
0
 private void ImmasTabbedMdiManager1_TabSelected(object sender, MdiTabEventArgs e)
 {
     this.ExplorerUpdate((sender as ImmasTabbedMdiManager).Tag, e.Tab.TextResolved);
 }
Ejemplo n.º 10
0
 private void tabbedMdiManager_TabDisplayed(object sender, MdiTabEventArgs e)
 {
     _childForms.Add(e.Tab.Form); //将子窗体添加到缓存中
 }