Esempio n. 1
0
 //Open Child form
 void openChildForm(Form frmChild)
 {
     if (ActiveMdiChild != null)
     {
         ActiveMdiChild.Hide();
     }
     frmChild.MdiParent = this;
     frmChild.Show();
 }
Esempio n. 2
0
        private void CurrencyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (ActiveMdiChild != null)
            {
                ActiveMdiChild.Hide();
            }

            myForms["Currency"].Show();
        }
Esempio n. 3
0
 public void HienThiQuyen_User()
 {
     btnDoiMatKhau.Enabled = true;
     HienThiKhoHang();
     HienThiTrangChu();
     label1.Visible   = true;
     label1.Text      = "Xin chào " + Access.HOTEN;
     btnNhaCC.Enabled = false;
     if (ActiveMdiChild != null)
     {
         ActiveMdiChild.Hide();
     }
 }
Esempio n. 4
0
 private void CloseOpenedChildForm()
 {
     if (ActiveMdiChild != null)
     {
         if (ActiveMdiChild.Name.StartsWith("CreditBill") ||
             ActiveMdiChild.Name.StartsWith("RetailBill") ||
             ActiveMdiChild.Name.StartsWith("WholeSaleBill"))
         {
             ActiveMdiChild.Hide();
             return;
         }
         ActiveMdiChild.Close();
     }
 }
Esempio n. 5
0
 public void HienThiQuyen_ChiNhanh()
 {
     label1.Visible = true;
     label1.Text    = "Xin chào " + Access.HOTEN;
     HienThiTrangChu();
     HienThiQuanLyNhanVien();
     HienThiKhoHang();
     HienThiBaoCao();
     //HienThiQuanLyNhanVien();
     //HienThiKhoHang();
     if (ActiveMdiChild != null)
     {
         ActiveMdiChild.Hide();
     }
 }
Esempio n. 6
0
 public void check(Form a)
 {
     if (this.ActiveMdiChild != null && this.ActiveMdiChild != a)
     {
         ActiveMdiChild.Hide();
         a.MdiParent   = this;
         a.WindowState = FormWindowState.Maximized;
         a.Show();
     }
     else
     {
         a.MdiParent   = this;
         a.WindowState = FormWindowState.Maximized;
         a.Show();
     }
 }
Esempio n. 7
0
 public void HienThiQuyen_CongTy()
 {
     label1.Visible        = true;
     label1.Text           = "Xin chào " + Access.HOTEN;
     btnDoiMatKhau.Enabled = true;
     //btnKhachHang.Enabled = true;
     rbpBaoCao.Visible    = true;
     rbQLNhanvien.Visible = true;
     //btnMatHang.Enabled = true;
     btnDangXuat.Visible = true;
     btnTaoTK.Enabled    = true;
     HienThiBaoCao();
     //HienThiQuanLyNhanVien();
     //HienThiKhoHang();
     if (ActiveMdiChild != null)
     {
         ActiveMdiChild.Hide();
     }
 }
Esempio n. 8
0
 private void btn_chart_Click(object sender, EventArgs e)
 {
     ButtonReset();
     if (ActiveMdiChild != null)
     {
         if (this.ActiveMdiChild != mchildForm_Chart)
         {
             //ActiveMdiChild.Close();
             ActiveMdiChild.Hide();
         }
         mchildForm_Chart = ShowActiveForm(mchildForm_Chart, typeof(chart)) as chart;
         mchildForm_Chart.Show();
     }
     else
     {
         mchildForm_Chart = ShowActiveForm(mchildForm_Chart, typeof(chart)) as chart;
         mchildForm_Chart.Show();
     }
     btn_chart.BackColor = Color.Red;
 }
Esempio n. 9
0
 private void btn_alarm_Click(object sender, EventArgs e)
 {
     ButtonReset();
     if (ActiveMdiChild != null)
     {
         if (this.ActiveMdiChild != mchildForm_Alarm)
         {
             //ActiveMdiChild.Close();
             ActiveMdiChild.Hide();
         }
         mchildForm_Alarm = ShowActiveForm(mchildForm_Alarm, typeof(alarm)) as alarm;
         mchildForm_Alarm.Show();
     }
     else
     {
         mchildForm_Alarm = ShowActiveForm(mchildForm_Alarm, typeof(alarm)) as alarm;
         mchildForm_Alarm.Show();
     }
     btn_alarm.BackColor = Color.Red;
 }
Esempio n. 10
0
 private void btn_search_Click(object sender, EventArgs e)
 {
     ButtonReset();
     if (ActiveMdiChild != null)
     {
         if (this.ActiveMdiChild != mchildForm_Search)
         {
             //ActiveMdiChild.Close();
             ActiveMdiChild.Hide();
         }
         mchildForm_Search = ShowActiveForm(mchildForm_Search, typeof(search)) as search;
         mchildForm_Search.Show();
     }
     else
     {
         mchildForm_Search = ShowActiveForm(mchildForm_Search, typeof(search)) as search;
         mchildForm_Search.Show();
     }
     btn_search.BackColor = Color.Red;
 }
Esempio n. 11
0
 private void btn_monitoring_Click(object sender, EventArgs e)
 {
     ButtonReset();
     if (ActiveMdiChild != null)
     {
         if (this.ActiveMdiChild != mchildForm_Monitoring)
         {
             //ActiveMdiChild.Close();
             ActiveMdiChild.Hide();
         }
         mchildForm_Monitoring = ShowActiveForm(mchildForm_Monitoring, typeof(monitoring)) as monitoring;
         mchildForm_Monitoring.Show();
     }
     else
     {
         mchildForm_Monitoring = ShowActiveForm(mchildForm_Monitoring, typeof(monitoring)) as monitoring;
         mchildForm_Monitoring.Show();
     }
     btn_monitoring.BackColor = Color.Red;
 }
Esempio n. 12
0
 private void Form1_Load(object sender, EventArgs e)
 {
     client = new SimpleTcpClient();
     client.StringEncoder     = Encoding.UTF8;
     client.DataReceived     += Client_DataReceived;
     btn_monitoring.BackColor = Color.Red;
     //시작메뉴 모니터링 화면
     if (ActiveMdiChild != null)
     {
         if (this.ActiveMdiChild != mchildForm_Monitoring)
         {
             //ActiveMdiChild.Close();
             ActiveMdiChild.Hide();
         }
         mchildForm_Monitoring = ShowActiveForm(mchildForm_Monitoring, typeof(monitoring)) as monitoring;
     }
     else
     {
         mchildForm_Monitoring = ShowActiveForm(mchildForm_Monitoring, typeof(monitoring)) as monitoring;
     }
 }
Esempio n. 13
0
 public void newElements()
 {
     ActiveMdiChild.Hide();
     ne.Show();
 }
Esempio n. 14
0
 public void mainView()
 {
     ActiveMdiChild.Hide();
     m.Show();
 }
Esempio n. 15
0
 public void newTable()
 {
     ActiveMdiChild.Hide();
     nt.Show();
 }