//Sets public void bindDisplaySetsForm(XtraTabPage xtraTabPage) { Ataqm objForm = new Ataqm(this); objForm.TopLevel = false; xtraTabPage.Controls.Add(objForm); objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; objForm.Dock = DockStyle.Fill; objForm.Show(); }
//Ataqm CURD private void btnAtaqm_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { try { restForeColorOfNavBarItem(); NavBarItem navBarItem = (NavBarItem)sender; navBarItem.Appearance.ForeColor = Color.Blue; if (!xtraTabControlStoresContent.Visible) { xtraTabControlStoresContent.Visible = true; } XtraTabPage xtraTabPage = getTabPage(xtraTabControlStoresContent, "عرض الأطقم"); if (xtraTabPage == null) { xtraTabControlStoresContent.TabPages.Add("عرض الأطقم"); xtraTabPage = getTabPage(xtraTabControlStoresContent, "عرض الأطقم"); } xtraTabPage.Controls.Clear(); xtraTabControlStoresContent.SelectedTabPage = xtraTabPage; Ataqm objForm = new Ataqm(this); objForm.TopLevel = false; xtraTabPage.Controls.Add(objForm); objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; objForm.Dock = DockStyle.Fill; //objForm.DisplayAtaqm(); objForm.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }