Beispiel #1
0
 private void UCMenuMaintenance_Load(object sender, EventArgs e)
 {
     menu              = ((formMenu)this.ParentForm);
     menu.FormClosing += new FormClosingEventHandler(menu_FormClosing);
     backColor1        = Color.Teal;
     backColor2        = Color.LightSeaGreen;
     hover             = Color.LightCoral;
     selected          = Color.Firebrick;
 }
Beispiel #2
0
        public void showMenu(UserControl uc, int x, int y)
        {
            formMenu menu = new formMenu(uc);

            menu.Location = new Point(x, y);
            menu.Show();
            menu.FormClosing += Menu_FormClosing;
            menu.Focus();
        }
Beispiel #3
0
 private void tabPatient_Click(object sender, EventArgs e)
 {
     try
     {
         resetColor(sender);
         formMenu menu = ((formMenu)this.ParentForm);
         menu.deact = false;
         UCMenuPatient uc = new UCMenuPatient(mainForm, menu);
         mainForm.showMenu(uc, ParentForm.Location.X + ParentForm.Width, ParentForm.Location.Y + this.tabPatient.Location.Y);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Beispiel #4
0
 public UCMenuItems(MainForm mainForm, formMenu menu)
 {
     InitializeComponent();
     this.mainForm = mainForm;
     this.menu     = menu;
 }