DevExpress控件使用随笔——TabConTrol

//获取当前页ID  
private void tabXymb_Selecting(object sender, DevExpress.XtraTab.TabPageCancelEventArgs e)
        {
            switch (e.PageIndex)
            {
                case 0:
                    _mxlb = 1;
                    _notes = txtBykn.Text.Trim();
                    break;
                case 1:
                    _mxlb = 2;
                    _notes = txtBlys.Text.Trim();
                    break;
                case 2:
                    _mxlb = 3;
                    _notes = txtKnyw.Text.Trim();
                    break;
                default:
                    _mxlb = 4;
                    _notes = txtBfz.Text.Trim();
                    break;
            }
        }
//获取上一页
        private void tabXymb_Selected(object sender, DevExpress.XtraTab.TabPageEventArgs e)
        {
            switch (tabXymb.SelectedTabPage.Name)
            {
                case "tabBykn":
                    _mxlb = 1;
                    _notes = txtBykn.Text.Trim();
                    break;
                case "tabBlys":
                    _mxlb = 2;
                    _notes = txtBlys.Text.Trim();
                    break;
                case "tabKnyw":
                    _mxlb = 3;
                    _notes = txtKnyw.Text.Trim();
                    break;
                default:
                    _mxlb = 4;
                    _notes = txtBfz.Text.Trim();
                    break;
            }
        }      


你可能感兴趣的:(c#,object)