This commit is contained in:
EggMan20339
2024-02-07 08:42:57 -05:00
parent 5385f9ffad
commit b7cdc094f2
19 changed files with 1508 additions and 1 deletions

View File

@@ -58,6 +58,12 @@
<Compile Include="frmSummary.Designer.cs">
<DependentUpon>frmSummary.cs</DependentUpon>
</Compile>
<Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs"/>
<Compile Include="Properties\AssemblyInfo.cs"/>
<EmbeddedResource Include="frmCalculate.resx">
@@ -66,6 +72,9 @@
<EmbeddedResource Include="frmSummary.resx">
<DependentUpon>frmSummary.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmMain.resx">
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

View File

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

201
Chapter6/frmMain.Designer.cs generated Normal file
View File

@@ -0,0 +1,201 @@
using System.ComponentModel;
namespace Chapter6
{
partial class frmMain
{
/// <summary>
/// Required designer variable.
/// </summary>
private IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Menu = new System.Windows.Forms.MenuStrip();
this.mnuFile = new System.Windows.Forms.ToolStripMenuItem();
this.mnuFileExit = new System.Windows.Forms.ToolStripMenuItem();
this.mnuEdit = new System.Windows.Forms.ToolStripMenuItem();
this.mnuEditCalculate = new System.Windows.Forms.ToolStripMenuItem();
this.mnuEditSummary = new System.Windows.Forms.ToolStripMenuItem();
this.mnuEditShowStudents = new System.Windows.Forms.ToolStripMenuItem();
this.mnuEditAddStudents = new System.Windows.Forms.ToolStripMenuItem();
this.mnuEditSearchStudent = new System.Windows.Forms.ToolStripMenuItem();
this.mnuWindow = new System.Windows.Forms.ToolStripMenuItem();
this.mnuWindowArrangeIcons = new System.Windows.Forms.ToolStripMenuItem();
this.mnuWindowsCascade = new System.Windows.Forms.ToolStripMenuItem();
this.munWindowHorizontal = new System.Windows.Forms.ToolStripMenuItem();
this.mnuWindowVertical = new System.Windows.Forms.ToolStripMenuItem();
this.mnuWindowCloseAll = new System.Windows.Forms.ToolStripMenuItem();
this.mnuHelp = new System.Windows.Forms.ToolStripMenuItem();
this.mnuHelpAbout = new System.Windows.Forms.ToolStripMenuItem();
this.Menu.SuspendLayout();
this.SuspendLayout();
//
// Menu
//
this.Menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuFile, this.mnuEdit, this.mnuWindow, this.mnuHelp });
this.Menu.Location = new System.Drawing.Point(0, 0);
this.Menu.Name = "Menu";
this.Menu.Size = new System.Drawing.Size(800, 24);
this.Menu.TabIndex = 1;
this.Menu.Text = "menuStrip1";
//
// mnuFile
//
this.mnuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuFileExit });
this.mnuFile.Name = "mnuFile";
this.mnuFile.Size = new System.Drawing.Size(37, 20);
this.mnuFile.Text = "File";
//
// mnuFileExit
//
this.mnuFileExit.Name = "mnuFileExit";
this.mnuFileExit.Size = new System.Drawing.Size(152, 22);
this.mnuFileExit.Text = "Exit";
this.mnuFileExit.Click += new System.EventHandler(this.mnuFileExit_Click_1);
//
// mnuEdit
//
this.mnuEdit.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuEditCalculate, this.mnuEditSummary, this.mnuEditShowStudents, this.mnuEditAddStudents, this.mnuEditSearchStudent });
this.mnuEdit.Name = "mnuEdit";
this.mnuEdit.Size = new System.Drawing.Size(39, 20);
this.mnuEdit.Text = "Edit";
//
// mnuEditCalculate
//
this.mnuEditCalculate.Name = "mnuEditCalculate";
this.mnuEditCalculate.Size = new System.Drawing.Size(153, 22);
this.mnuEditCalculate.Text = "Calculate";
//
// mnuEditSummary
//
this.mnuEditSummary.Name = "mnuEditSummary";
this.mnuEditSummary.Size = new System.Drawing.Size(153, 22);
this.mnuEditSummary.Text = "Summary";
//
// mnuEditShowStudents
//
this.mnuEditShowStudents.Name = "mnuEditShowStudents";
this.mnuEditShowStudents.Size = new System.Drawing.Size(153, 22);
this.mnuEditShowStudents.Text = "Show Students";
//
// mnuEditAddStudents
//
this.mnuEditAddStudents.Name = "mnuEditAddStudents";
this.mnuEditAddStudents.Size = new System.Drawing.Size(153, 22);
this.mnuEditAddStudents.Text = "Add Students";
//
// mnuEditSearchStudent
//
this.mnuEditSearchStudent.Name = "mnuEditSearchStudent";
this.mnuEditSearchStudent.Size = new System.Drawing.Size(153, 22);
this.mnuEditSearchStudent.Text = "Search Student";
//
// mnuWindow
//
this.mnuWindow.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuWindowArrangeIcons, this.mnuWindowsCascade, this.munWindowHorizontal, this.mnuWindowVertical, this.mnuWindowCloseAll });
this.mnuWindow.Name = "mnuWindow";
this.mnuWindow.Size = new System.Drawing.Size(63, 20);
this.mnuWindow.Text = "Window";
//
// mnuWindowArrangeIcons
//
this.mnuWindowArrangeIcons.Name = "mnuWindowArrangeIcons";
this.mnuWindowArrangeIcons.Size = new System.Drawing.Size(147, 22);
this.mnuWindowArrangeIcons.Text = "Arrange Icons";
//
// mnuWindowsCascade
//
this.mnuWindowsCascade.Name = "mnuWindowsCascade";
this.mnuWindowsCascade.Size = new System.Drawing.Size(147, 22);
this.mnuWindowsCascade.Text = "Cascade";
//
// munWindowHorizontal
//
this.munWindowHorizontal.Name = "munWindowHorizontal";
this.munWindowHorizontal.Size = new System.Drawing.Size(147, 22);
this.munWindowHorizontal.Text = "Horizontal";
//
// mnuWindowVertical
//
this.mnuWindowVertical.Name = "mnuWindowVertical";
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(147, 22);
this.mnuWindowCloseAll.Text = "Close All";
//
// mnuHelp
//
this.mnuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.mnuHelpAbout });
this.mnuHelp.Name = "mnuHelp";
this.mnuHelp.Size = new System.Drawing.Size(44, 20);
this.mnuHelp.Text = "Help";
//
// mnuHelpAbout
//
this.mnuHelpAbout.Name = "mnuHelpAbout";
this.mnuHelpAbout.Size = new System.Drawing.Size(107, 22);
this.mnuHelpAbout.Text = "About";
//
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.Menu);
this.IsMdiContainer = true;
this.MainMenuStrip = this.Menu;
this.Name = "frmMain";
this.Text = "MDI";
this.Menu.ResumeLayout(false);
this.Menu.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.ToolStripMenuItem mnuEditCalculate;
private System.Windows.Forms.ToolStripMenuItem mnuEditSummary;
private System.Windows.Forms.ToolStripMenuItem mnuEditShowStudents;
private System.Windows.Forms.ToolStripMenuItem mnuEditAddStudents;
private System.Windows.Forms.ToolStripMenuItem mnuEditSearchStudent;
private System.Windows.Forms.ToolStripMenuItem mnuWindow;
private System.Windows.Forms.ToolStripMenuItem mnuWindowArrangeIcons;
private System.Windows.Forms.ToolStripMenuItem mnuWindowsCascade;
private System.Windows.Forms.ToolStripMenuItem munWindowHorizontal;
private System.Windows.Forms.ToolStripMenuItem mnuWindowVertical;
private System.Windows.Forms.ToolStripMenuItem mnuWindowCloseAll;
private System.Windows.Forms.ToolStripMenuItem mnuHelp;
private System.Windows.Forms.ToolStripMenuItem mnuHelpAbout;
private System.Windows.Forms.MenuStrip Menu;
private System.Windows.Forms.ToolStripMenuItem mnuFile;
private System.Windows.Forms.ToolStripMenuItem mnuFileExit;
private System.Windows.Forms.ToolStripMenuItem mnuEdit;
#endregion
}
}

23
Chapter6/frmMain.cs Normal file
View File

@@ -0,0 +1,23 @@
using System;
using System.Windows.Forms;
namespace Chapter6
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
private void mnuFileExit_Click(object sender, EventArgs e)
{
Close();
}
private void mnuFileExit_Click_1(object sender, EventArgs e)
{
Close();
}
}
}

123
Chapter6/frmMain.resx Normal file
View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>