public bool tabControlCheckHave(System.Windows.Forms.TabControl tab, String tabName) { for (int i = 0; i < tab.TabCount; i++) { if (tab.TabPages[i].Text == tabName) { tab.SelectedIndex = i; return true; } } return false; } public void Add_TabPage(string str, Form myForm) { if (tabControlCheckHave(this.tabControl1, str)) { return; } else { tabControl1.TabPages.Add(str); tabControl1.SelectTab(tabControl1.TabPages.Count - 1); myForm.FormBorderStyle = FormBorderStyle.None; myForm.TopLevel = false; myForm.Show(); myForm.Parent = tabControl1.SelectedTab; tabControl1.SelectedTab.AutoScroll = true; } } private void BindTabPage(LB002 lb) { Add_TabPage("基本参数", new frmTypeParameter(lb)); Add_TabPage("机型客舱", new frmAircraftCabin()); Add_TabPage("基本参数", new frmTypeParameter(lb)); Add_TabPage("机型客舱", new frmAircraftCabin(lb)); Add_TabPage("散装舱", new frmHeavyBulkTankJoint()); Add_TabPage("集装箱", new frmContainer()); Add_TabPage("机组", new frmStandardUnitConfigurationInformation()); Add_TabPage("机供品", new frmJiGongPinInformation(lb)); Add_TabPage("油量指数范围", new frmOilIndex(lb)); Add_TabPage("重心包线范围", new frmCenterOfGravityEnvelope()); Add_TabPage("最佳重心范围", new frmBestWeight(lb)); Add_TabPage("配平值", new frmBalancingValue()); Add_TabPage("特别项目", new frmStretcherSeatInformation()); Add_TabPage("板箱", new frmBoardBoxes()); Add_TabPage("侧平衡&侧不平衡", new frmSideOfBalance()); Add_TabPage("舱位信息", new frmShippingSpaceInformation()); Add_TabPage("尾油箱", new frmTailOilTank(lb)); }
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。