private IBasicForm SetForm(String tag) { IBasicForm ift = null; switch (tag) { case "표준 코드": ift = new DefaultCode(_LoginInfo, this); break; case "표준 공정": ift = new StandardProcess(_LoginInfo, this); break; case "사원 정보": ift = new MemberView(_LoginInfo, this); break; case "수주/출하 정보": ift = new OrderView(_LoginInfo, this); break; case "품목 정보": ift = new SubjectView(_LoginInfo, this); break; case "부품 정보": ift = new PartView(_LoginInfo, this); break; case "공지사항": ift = new NoticeBoard(_LoginInfo, this); break; case "거래처 정보": ift = new CustomerInfo(_LoginInfo, this); break; case "표준 설비": ift = new MachineView(_LoginInfo, this); break; case "System.Windows.Forms.Label, Text: label4": ift = new TESTPAGE(_LoginInfo, this); break; } return(ift); }
private void MakeTag(String str) { string title = str; TabPage myTabPage = new TabPage(title); tabControl1.TabPages.Add(myTabPage); IBasicForm it = SetForm(str); it.TopLevel = false; myTabPage.Controls.Add(it.SetForm()); it.WindowState = System.Windows.Forms.FormWindowState.Maximized; it.Show(); this.tabControl1.SelectedTab = myTabPage; }