コード例 #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;
 }
コード例 #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();
        }
コード例 #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);
     }
 }
コード例 #4
0
 public UCMenuItems(MainForm mainForm, formMenu menu)
 {
     InitializeComponent();
     this.mainForm = mainForm;
     this.menu     = menu;
 }