Added code on mnuNavigationView click to open frmInfo.

This commit is contained in:
Adam McCane 2024-02-09 11:44:23 -05:00
parent 4647d70c79
commit 8e3c58eec4
3 changed files with 43 additions and 36 deletions

View File

@ -16,7 +16,7 @@ namespace Louis__Pharmacy_CNSA212_FP
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmRefill());
Application.Run(new frmMain());
}
}
}

View File

@ -30,10 +30,10 @@
{
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.mnuNavigation = new System.Windows.Forms.ToolStripMenuItem();
this.mnuView = new System.Windows.Forms.ToolStripMenuItem();
this.mnuAddUpdatePatientPhysician = new System.Windows.Forms.ToolStripMenuItem();
this.mnuAddUpdatePrescription = new System.Windows.Forms.ToolStripMenuItem();
this.mnuAddUpdateRemoveRefill = new System.Windows.Forms.ToolStripMenuItem();
this.mnuNavigationView = new System.Windows.Forms.ToolStripMenuItem();
this.mnuNavigationAUPaPh = new System.Windows.Forms.ToolStripMenuItem();
this.mnuNavigationAUPres = new System.Windows.Forms.ToolStripMenuItem();
this.mnuNavigationAURRefill = new System.Windows.Forms.ToolStripMenuItem();
this.mnuWindow = new System.Windows.Forms.ToolStripMenuItem();
this.mnuWindowArrangeIcons = new System.Windows.Forms.ToolStripMenuItem();
this.mnuWindowCascade = new System.Windows.Forms.ToolStripMenuItem();
@ -60,38 +60,38 @@
// mnuNavigation
//
this.mnuNavigation.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mnuView,
this.mnuAddUpdatePatientPhysician,
this.mnuAddUpdatePrescription,
this.mnuAddUpdateRemoveRefill});
this.mnuNavigationView,
this.mnuNavigationAUPaPh,
this.mnuNavigationAUPres,
this.mnuNavigationAURRefill});
this.mnuNavigation.Name = "mnuNavigation";
this.mnuNavigation.Size = new System.Drawing.Size(77, 20);
this.mnuNavigation.Text = "Navigation";
//
// mnuView
// mnuNavigationView
//
this.mnuView.Name = "mnuView";
this.mnuView.Size = new System.Drawing.Size(286, 22);
this.mnuView.Text = "View Patient/Prescription/Physician Info";
this.mnuView.Click += new System.EventHandler(this.mnuView_Click);
this.mnuNavigationView.Name = "mnuNavigationView";
this.mnuNavigationView.Size = new System.Drawing.Size(286, 22);
this.mnuNavigationView.Text = "View Patient/Prescription/Physician Info";
this.mnuNavigationView.Click += new System.EventHandler(this.mnuNavigationView_Click);
//
// mnuAddUpdatePatientPhysician
// mnuNavigationAUPaPh
//
this.mnuAddUpdatePatientPhysician.Name = "mnuAddUpdatePatientPhysician";
this.mnuAddUpdatePatientPhysician.Size = new System.Drawing.Size(286, 22);
this.mnuAddUpdatePatientPhysician.Text = "Add/Update Patient/Physician";
this.mnuNavigationAUPaPh.Name = "mnuNavigationAUPaPh";
this.mnuNavigationAUPaPh.Size = new System.Drawing.Size(286, 22);
this.mnuNavigationAUPaPh.Text = "Add/Update Patient/Physician";
//
// mnuAddUpdatePrescription
// mnuNavigationAUPres
//
this.mnuAddUpdatePrescription.Name = "mnuAddUpdatePrescription";
this.mnuAddUpdatePrescription.Size = new System.Drawing.Size(286, 22);
this.mnuAddUpdatePrescription.Text = "Add/Update Prescription";
this.mnuNavigationAUPres.Name = "mnuNavigationAUPres";
this.mnuNavigationAUPres.Size = new System.Drawing.Size(286, 22);
this.mnuNavigationAUPres.Text = "Add/Update Prescription";
//
// mnuAddUpdateRemoveRefill
// mnuNavigationAURRefill
//
this.mnuAddUpdateRemoveRefill.Name = "mnuAddUpdateRemoveRefill";
this.mnuAddUpdateRemoveRefill.Size = new System.Drawing.Size(286, 22);
this.mnuAddUpdateRemoveRefill.Text = "Add/Update/Remove Refill";
this.mnuNavigationAURRefill.Name = "mnuNavigationAURRefill";
this.mnuNavigationAURRefill.Size = new System.Drawing.Size(286, 22);
this.mnuNavigationAURRefill.Text = "Add/Update/Remove Refill";
//
// mnuWindow
//
@ -108,31 +108,31 @@
// mnuWindowArrangeIcons
//
this.mnuWindowArrangeIcons.Name = "mnuWindowArrangeIcons";
this.mnuWindowArrangeIcons.Size = new System.Drawing.Size(180, 22);
this.mnuWindowArrangeIcons.Size = new System.Drawing.Size(147, 22);
this.mnuWindowArrangeIcons.Text = "Arrange Icons";
//
// mnuWindowCascade
//
this.mnuWindowCascade.Name = "mnuWindowCascade";
this.mnuWindowCascade.Size = new System.Drawing.Size(180, 22);
this.mnuWindowCascade.Size = new System.Drawing.Size(147, 22);
this.mnuWindowCascade.Text = "Cascade";
//
// mnuWindowHorizontal
//
this.mnuWindowHorizontal.Name = "mnuWindowHorizontal";
this.mnuWindowHorizontal.Size = new System.Drawing.Size(180, 22);
this.mnuWindowHorizontal.Size = new System.Drawing.Size(147, 22);
this.mnuWindowHorizontal.Text = "Horizontal";
//
// mnuWindowVertical
//
this.mnuWindowVertical.Name = "mnuWindowVertical";
this.mnuWindowVertical.Size = new System.Drawing.Size(180, 22);
this.mnuWindowVertical.Size = new System.Drawing.Size(147, 22);
this.mnuWindowVertical.Text = "Vertical";
//
// mnuWindowCloseAll
//
this.mnuWindowCloseAll.Name = "mnuWindowCloseAll";
this.mnuWindowCloseAll.Size = new System.Drawing.Size(180, 22);
this.mnuWindowCloseAll.Size = new System.Drawing.Size(147, 22);
this.mnuWindowCloseAll.Text = "Close All";
//
// mnuHelp
@ -171,10 +171,10 @@
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem mnuNavigation;
private System.Windows.Forms.ToolStripMenuItem mnuView;
private System.Windows.Forms.ToolStripMenuItem mnuAddUpdatePatientPhysician;
private System.Windows.Forms.ToolStripMenuItem mnuAddUpdatePrescription;
private System.Windows.Forms.ToolStripMenuItem mnuAddUpdateRemoveRefill;
private System.Windows.Forms.ToolStripMenuItem mnuNavigationView;
private System.Windows.Forms.ToolStripMenuItem mnuNavigationAUPaPh;
private System.Windows.Forms.ToolStripMenuItem mnuNavigationAUPres;
private System.Windows.Forms.ToolStripMenuItem mnuNavigationAURRefill;
private System.Windows.Forms.ToolStripMenuItem mnuWindow;
private System.Windows.Forms.ToolStripMenuItem mnuHelp;
private System.Windows.Forms.ToolStripMenuItem mnuHelpAbout;

View File

@ -27,9 +27,16 @@ namespace Louis__Pharmacy_CNSA212_FP
formWelcome.Focus();
}
private void mnuView_Click(object sender, EventArgs e)
private void mnuNavigationView_Click(object sender, EventArgs e)
{
frmInfo formInfo = new frmInfo();
formInfo.MdiParent = this;
formInfo.StartPosition = FormStartPosition.CenterScreen;
formInfo.Show();
formInfo.Focus();
mnuNavigationView.Checked = true;
}
}
}