コード例 #1
0
ファイル: FrmDesign.cs プロジェクト: scsi110/FormDesignerLib
        private void Tab_Mamager_Click(object sender, EventArgs e)
        {
            Hashtable _has, _returnHas;

            _has = new Hashtable();
            if ((this.formDesignerHost.RootComponent as Form).Controls.Find(TabControlName, true).Length > 0)
            {
                TabControl tc = (this.formDesignerHost.RootComponent as Form).Controls.Find(TabControlName, true)[0] as TabControl;

                int _index = 1;
                foreach (TabPage item in tc.TabPages)
                {
                    _has.Add(_index, item.Name);
                    _index += 1;
                }
            }
            if (_has.Count == 0)
            {
                return;
            }
            FrmTabManager frm = new FrmTabManager();

            frm.m_has = _has;
            frm.ShowDialog();
            _returnHas = frm.m_returnHas;
            if (_returnHas != null && _returnHas.Count > 0)
            {
                string key = this.BillList.SelectedItem.ToString();
                if (key == "")
                {
                    return;
                }
                int _trantype;
                _trantype = BillType[this.BillList.SelectedItem.ToString()];
                ChangetheTabPagesIndex(_trantype, _returnHas);
            }
        }
コード例 #2
0
ファイル: FrmDesign.cs プロジェクト: nikyxxx/FormDesignerLib
        private void Tab_Mamager_Click(object sender, EventArgs e)
        {
            Hashtable _has,_returnHas;
            _has = new Hashtable();
            if ((this.formDesignerHost.RootComponent as Form).Controls.Find(TabControlName, true).Length > 0)
            {
                TabControl tc = (this.formDesignerHost.RootComponent as Form).Controls.Find(TabControlName, true)[0] as TabControl;

                int _index = 1;
                foreach (TabPage item in tc.TabPages)
                {
                    _has.Add(_index, item.Name);
                    _index += 1;
                }
            }
            if (_has.Count==0) return;
            FrmTabManager frm = new FrmTabManager();
            frm.m_has = _has;
            frm.ShowDialog();
            _returnHas = frm.m_returnHas;
            if (_returnHas != null && _returnHas.Count > 0)
            {
                string key = this.BillList.SelectedItem.ToString();
                if (key == "") return;
                int _trantype;
                _trantype = BillType[this.BillList.SelectedItem.ToString()];
                ChangetheTabPagesIndex(_trantype, _returnHas);
            }
        }