Beispiel #1
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     if (keyData == Keys.F1 && btnSales.Enabled == true)
     {
         pos.Show();
         this.Hide();
         return(true);    // indicate that you handled this keystroke
     }
     if (keyData == Keys.F2 && btnCustomers.Enabled == true)
     {
         mdicus.Show();
         this.Hide();
         return(true);
     }
     if (keyData == Keys.F3 && btnInventory.Enabled == true)
     {
         mdiInv.Show();
         this.Hide();
         return(true);
     }
     if (keyData == Keys.F4 && btnGenReports.Enabled == true)
     {
         reports.Show();
         this.Hide();
         return(true);
     }
     if (keyData == Keys.F5 && btnGC.Enabled == true)
     {
         gc = new frmGiftCard();
         gc.ShowDialog();
         return(true);
     }
     if (keyData == Keys.F6 && btnUserAccounts.Enabled == true)
     {
         mdiUA.Show();
         this.Hide();
         return(true);
     }
     if (keyData == Keys.F7 && btnConfig.Enabled == true)
     {
         mdiConfig = new mdiConfiguration();
         mdiConfig.ShowDialog();
         return(true);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }
Beispiel #2
0
 private void btnConfig_Click(object sender, EventArgs e)
 {
     mdiConfig = new mdiConfiguration();
     mdiConfig.ShowDialog();
 }