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

View File

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