private void LuuTru_PageRemoved(object sender, DevExpress.XtraTabbedMdi.MdiTabPageEventArgs e) { if (MdiChildren.Count() > 0) { pb1.Hide(); WelcomeBack.Hide(); } else { pb1.Show(); WelcomeBack.Show(); WelcomeBack.Text = "Tiếp tục với công việc nào: " + name; } }
private void MainForm_Activated(object sender, EventArgs e) { Data_NV DNV = new Data_NV(); var name = DNV.getName(Id); this.name = name; if (MdiChildren.Count() == 0) { txtXinChao.Caption = "Xin chào: ".ToUpper() + name; txtChucVu.Caption = "Chức vụ: ".ToUpper() + ChucVu; WelcomeBack.Text = "Chào mừng quay trở lại: " + name; } this.Opacity = 1.00d; this.BackColor = Color.White; this.accordionControl1.Appearance.AccordionControl.BackColor = Color.Empty; if (MdiChildren.Count() == 0) { pb1.Show(); WelcomeBack.Show(); } accordionControl1.Show(); }