diff --git a/Chapter6.zip b/Chapter6.zip index 70231eb..4288bb2 100644 Binary files a/Chapter6.zip and b/Chapter6.zip differ diff --git a/Chapter6/frmMain.Designer.cs b/Chapter6/frmMain.Designer.cs index d61c546..6445ff1 100644 --- a/Chapter6/frmMain.Designer.cs +++ b/Chapter6/frmMain.Designer.cs @@ -70,7 +70,7 @@ namespace Chapter6 // mnuFileExit // this.mnuFileExit.Name = "mnuFileExit"; - this.mnuFileExit.Size = new System.Drawing.Size(152, 22); + this.mnuFileExit.Size = new System.Drawing.Size(93, 22); this.mnuFileExit.Text = "Exit"; this.mnuFileExit.Click += new System.EventHandler(this.mnuFileExit_Click_1); // @@ -86,12 +86,14 @@ namespace Chapter6 this.mnuEditCalculate.Name = "mnuEditCalculate"; this.mnuEditCalculate.Size = new System.Drawing.Size(153, 22); this.mnuEditCalculate.Text = "Calculate"; + this.mnuEditCalculate.Click += mnuEditCalculate_Click; // // mnuEditSummary // this.mnuEditSummary.Name = "mnuEditSummary"; this.mnuEditSummary.Size = new System.Drawing.Size(153, 22); this.mnuEditSummary.Text = "Summary"; + this.mnuEditSummary.Click += new System.EventHandler(this.mnuEditSummary_Click); // // mnuEditShowStudents // diff --git a/Chapter6/frmMain.cs b/Chapter6/frmMain.cs index 560b6fd..c0ded0c 100644 --- a/Chapter6/frmMain.cs +++ b/Chapter6/frmMain.cs @@ -19,5 +19,41 @@ namespace Chapter6 { Close(); } + + private void mnuEditCalculate_Click(object sender, EventArgs e) + { + frmCalculate aform = new frmCalculate(); + + mnuFile.Visible = true; + mnuEditSummary.Enabled = true; + + + aform.MdiParent = this; + aform.StartPosition = FormStartPosition.CenterParent; + aform.Show(); + aform.Focus(); + + mnuEditCalculate.Checked = true; + + + + } + + private void mnuEditSummary_Click(object sender, EventArgs e) + { + frmSummary aform = new frmSummary(); + + mnuFile.Visible = true; + mnuEditSummary.Enabled = true; + + + aform.MdiParent = this; + aform.StartPosition = FormStartPosition.CenterParent; + aform.Show(); + aform.Focus(); + + mnuEditCalculate.Checked = true; + + } } } \ No newline at end of file