Finished Midterm!

This commit is contained in:
EggMan20339 2024-02-02 10:31:09 -05:00
parent 3fad375ac7
commit a59db8a29d
7 changed files with 742 additions and 66 deletions

View File

@ -1,40 +0,0 @@
namespace MidtermProject
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.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.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "Form1";
}
#endregion
}
}

View File

@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MidtermProject
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}

346
MidtermProject/Midterm.Designer.cs generated Normal file
View File

@ -0,0 +1,346 @@
namespace MidtermProject
{
partial class Midterm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.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.lblDisTitle = new System.Windows.Forms.Label();
this.lblDisBlue = new System.Windows.Forms.Label();
this.lblDisYellow = new System.Windows.Forms.Label();
this.lblDisTotal = new System.Windows.Forms.Label();
this.lblTotal = new System.Windows.Forms.Label();
this.txtYellow = new System.Windows.Forms.TextBox();
this.txtBlue = new System.Windows.Forms.TextBox();
this.grpSummary = new System.Windows.Forms.GroupBox();
this.lblSumGrandTotal = new System.Windows.Forms.Label();
this.lblTransactions = new System.Windows.Forms.Label();
this.lblAvg = new System.Windows.Forms.Label();
this.lblSumYellow = new System.Windows.Forms.Label();
this.lblSumBlue = new System.Windows.Forms.Label();
this.lblDisTotalSales = new System.Windows.Forms.Label();
this.lblDisTotalTransactions = new System.Windows.Forms.Label();
this.lblDisAvg = new System.Windows.Forms.Label();
this.lblDisSummaryYellow = new System.Windows.Forms.Label();
this.lblDisSummaryBlue = new System.Windows.Forms.Label();
this.chkSummary = new System.Windows.Forms.CheckBox();
this.chkTax = new System.Windows.Forms.CheckBox();
this.btnCalc = new System.Windows.Forms.Button();
this.btnReset = new System.Windows.Forms.Button();
this.btnNext = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.grpSummary.SuspendLayout();
this.SuspendLayout();
//
// lblDisTitle
//
this.lblDisTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblDisTitle.Location = new System.Drawing.Point(141, 20);
this.lblDisTitle.Name = "lblDisTitle";
this.lblDisTitle.Size = new System.Drawing.Size(335, 40);
this.lblDisTitle.TabIndex = 0;
this.lblDisTitle.Text = "TSCT Skating Association";
this.lblDisTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblDisBlue
//
this.lblDisBlue.Location = new System.Drawing.Point(60, 103);
this.lblDisBlue.Name = "lblDisBlue";
this.lblDisBlue.Size = new System.Drawing.Size(164, 27);
this.lblDisBlue.TabIndex = 1;
this.lblDisBlue.Text = "&Blue Skateboards:";
this.lblDisBlue.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblDisYellow
//
this.lblDisYellow.Location = new System.Drawing.Point(60, 143);
this.lblDisYellow.Name = "lblDisYellow";
this.lblDisYellow.Size = new System.Drawing.Size(164, 27);
this.lblDisYellow.TabIndex = 2;
this.lblDisYellow.Text = "&Yellow Skateboards:";
this.lblDisYellow.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblDisTotal
//
this.lblDisTotal.Location = new System.Drawing.Point(60, 216);
this.lblDisTotal.Name = "lblDisTotal";
this.lblDisTotal.Size = new System.Drawing.Size(164, 27);
this.lblDisTotal.TabIndex = 3;
this.lblDisTotal.Text = "&Total Amount:";
this.lblDisTotal.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblTotal
//
this.lblTotal.BackColor = System.Drawing.SystemColors.Info;
this.lblTotal.Location = new System.Drawing.Point(230, 216);
this.lblTotal.Name = "lblTotal";
this.lblTotal.Size = new System.Drawing.Size(164, 27);
this.lblTotal.TabIndex = 4;
this.lblTotal.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// txtYellow
//
this.txtYellow.Location = new System.Drawing.Point(230, 147);
this.txtYellow.Name = "txtYellow";
this.txtYellow.Size = new System.Drawing.Size(162, 20);
this.txtYellow.TabIndex = 2;
this.txtYellow.TextChanged += new System.EventHandler(this.txtYellow_TextChanged);
//
// txtBlue
//
this.txtBlue.Location = new System.Drawing.Point(230, 107);
this.txtBlue.Name = "txtBlue";
this.txtBlue.Size = new System.Drawing.Size(162, 20);
this.txtBlue.TabIndex = 0;
this.txtBlue.TextChanged += new System.EventHandler(this.txtBlue_TextChanged);
//
// grpSummary
//
this.grpSummary.Controls.Add(this.lblSumGrandTotal);
this.grpSummary.Controls.Add(this.lblTransactions);
this.grpSummary.Controls.Add(this.lblAvg);
this.grpSummary.Controls.Add(this.lblSumYellow);
this.grpSummary.Controls.Add(this.lblSumBlue);
this.grpSummary.Controls.Add(this.lblDisTotalSales);
this.grpSummary.Controls.Add(this.lblDisTotalTransactions);
this.grpSummary.Controls.Add(this.lblDisAvg);
this.grpSummary.Controls.Add(this.lblDisSummaryYellow);
this.grpSummary.Controls.Add(this.lblDisSummaryBlue);
this.grpSummary.Location = new System.Drawing.Point(544, 262);
this.grpSummary.Name = "grpSummary";
this.grpSummary.Size = new System.Drawing.Size(232, 154);
this.grpSummary.TabIndex = 7;
this.grpSummary.TabStop = false;
this.grpSummary.Text = "Summary Information";
//
// lblSumGrandTotal
//
this.lblSumGrandTotal.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblSumGrandTotal.Location = new System.Drawing.Point(116, 131);
this.lblSumGrandTotal.Name = "lblSumGrandTotal";
this.lblSumGrandTotal.Size = new System.Drawing.Size(110, 20);
this.lblSumGrandTotal.TabIndex = 23;
//
// lblTransactions
//
this.lblTransactions.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblTransactions.Location = new System.Drawing.Point(116, 104);
this.lblTransactions.Name = "lblTransactions";
this.lblTransactions.Size = new System.Drawing.Size(100, 20);
this.lblTransactions.TabIndex = 22;
//
// lblAvg
//
this.lblAvg.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblAvg.Location = new System.Drawing.Point(116, 77);
this.lblAvg.Name = "lblAvg";
this.lblAvg.Size = new System.Drawing.Size(110, 20);
this.lblAvg.TabIndex = 21;
//
// lblSumYellow
//
this.lblSumYellow.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblSumYellow.Location = new System.Drawing.Point(116, 50);
this.lblSumYellow.Name = "lblSumYellow";
this.lblSumYellow.Size = new System.Drawing.Size(100, 20);
this.lblSumYellow.TabIndex = 20;
//
// lblSumBlue
//
this.lblSumBlue.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblSumBlue.Location = new System.Drawing.Point(116, 23);
this.lblSumBlue.Name = "lblSumBlue";
this.lblSumBlue.Size = new System.Drawing.Size(100, 20);
this.lblSumBlue.TabIndex = 19;
//
// lblDisTotalSales
//
this.lblDisTotalSales.Location = new System.Drawing.Point(6, 124);
this.lblDisTotalSales.Name = "lblDisTotalSales";
this.lblDisTotalSales.Size = new System.Drawing.Size(104, 27);
this.lblDisTotalSales.TabIndex = 18;
this.lblDisTotalSales.Text = "Total Sales:";
this.lblDisTotalSales.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblDisTotalTransactions
//
this.lblDisTotalTransactions.Location = new System.Drawing.Point(6, 97);
this.lblDisTotalTransactions.Name = "lblDisTotalTransactions";
this.lblDisTotalTransactions.Size = new System.Drawing.Size(104, 27);
this.lblDisTotalTransactions.TabIndex = 17;
this.lblDisTotalTransactions.Text = "Total Transactions:";
this.lblDisTotalTransactions.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblDisAvg
//
this.lblDisAvg.Location = new System.Drawing.Point(6, 70);
this.lblDisAvg.Name = "lblDisAvg";
this.lblDisAvg.Size = new System.Drawing.Size(104, 27);
this.lblDisAvg.TabIndex = 16;
this.lblDisAvg.Text = "Average Sale";
this.lblDisAvg.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblDisAvg.Click += new System.EventHandler(this.lblDisAvg_Click);
//
// lblDisSummaryYellow
//
this.lblDisSummaryYellow.Location = new System.Drawing.Point(6, 43);
this.lblDisSummaryYellow.Name = "lblDisSummaryYellow";
this.lblDisSummaryYellow.Size = new System.Drawing.Size(104, 27);
this.lblDisSummaryYellow.TabIndex = 15;
this.lblDisSummaryYellow.Text = "Yellow Skateboards:";
this.lblDisSummaryYellow.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblDisSummaryBlue
//
this.lblDisSummaryBlue.Location = new System.Drawing.Point(6, 16);
this.lblDisSummaryBlue.Name = "lblDisSummaryBlue";
this.lblDisSummaryBlue.Size = new System.Drawing.Size(104, 27);
this.lblDisSummaryBlue.TabIndex = 14;
this.lblDisSummaryBlue.Text = "Blue Skateboards:";
this.lblDisSummaryBlue.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// chkSummary
//
this.chkSummary.Location = new System.Drawing.Point(544, 232);
this.chkSummary.Name = "chkSummary";
this.chkSummary.Size = new System.Drawing.Size(104, 24);
this.chkSummary.TabIndex = 100;
this.chkSummary.Text = "&Show Summary";
this.chkSummary.UseVisualStyleBackColor = true;
this.chkSummary.CheckedChanged += new System.EventHandler(this.chkSummary_CheckedChanged);
//
// chkTax
//
this.chkTax.Location = new System.Drawing.Point(230, 189);
this.chkTax.Name = "chkTax";
this.chkTax.Size = new System.Drawing.Size(164, 24);
this.chkTax.TabIndex = 3;
this.chkTax.Text = "In State &Tax (4%)";
this.chkTax.UseVisualStyleBackColor = true;
this.chkTax.CheckedChanged += new System.EventHandler(this.chkTax_CheckedChanged);
//
// btnCalc
//
this.btnCalc.Location = new System.Drawing.Point(165, 324);
this.btnCalc.Name = "btnCalc";
this.btnCalc.Size = new System.Drawing.Size(93, 23);
this.btnCalc.TabIndex = 4;
this.btnCalc.Text = "&Calculate";
this.btnCalc.UseVisualStyleBackColor = true;
this.btnCalc.Click += new System.EventHandler(this.btnCalc_Click);
//
// btnReset
//
this.btnReset.Location = new System.Drawing.Point(283, 324);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(93, 23);
this.btnReset.TabIndex = 100;
this.btnReset.Text = "Reset";
this.btnReset.UseVisualStyleBackColor = true;
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
//
// btnNext
//
this.btnNext.Location = new System.Drawing.Point(165, 366);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(93, 23);
this.btnNext.TabIndex = 5;
this.btnNext.Text = "Clear / Next";
this.btnNext.UseVisualStyleBackColor = true;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// btnExit
//
this.btnExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnExit.Location = new System.Drawing.Point(283, 366);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(93, 23);
this.btnExit.TabIndex = 100;
this.btnExit.Text = "&Exit";
this.btnExit.UseVisualStyleBackColor = true;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// Midterm
//
this.AcceptButton = this.btnCalc;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnExit;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnNext);
this.Controls.Add(this.btnReset);
this.Controls.Add(this.btnCalc);
this.Controls.Add(this.chkTax);
this.Controls.Add(this.chkSummary);
this.Controls.Add(this.grpSummary);
this.Controls.Add(this.txtBlue);
this.Controls.Add(this.txtYellow);
this.Controls.Add(this.lblTotal);
this.Controls.Add(this.lblDisTotal);
this.Controls.Add(this.lblDisYellow);
this.Controls.Add(this.lblDisBlue);
this.Controls.Add(this.lblDisTitle);
this.Name = "Midterm";
this.Text = "Form1";
this.grpSummary.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Label lblSumBlue;
private System.Windows.Forms.Label lblSumYellow;
private System.Windows.Forms.Label lblAvg;
private System.Windows.Forms.Label lblTransactions;
private System.Windows.Forms.Label lblSumGrandTotal;
private System.Windows.Forms.CheckBox chkTax;
private System.Windows.Forms.Button btnCalc;
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Label lblDisTotal;
private System.Windows.Forms.Label lblDisSummaryBlue;
private System.Windows.Forms.Label lblDisSummaryYellow;
private System.Windows.Forms.Label lblDisAvg;
private System.Windows.Forms.Label lblDisTotalSales;
private System.Windows.Forms.TextBox txtYellow;
private System.Windows.Forms.TextBox txtBlue;
private System.Windows.Forms.GroupBox grpSummary;
private System.Windows.Forms.CheckBox chkSummary;
private System.Windows.Forms.Label lblDisTitle;
private System.Windows.Forms.Label lblDisBlue;
private System.Windows.Forms.Label lblDisYellow;
private System.Windows.Forms.Label lblTotal;
private System.Windows.Forms.Label lblDisTotalTransactions;
#endregion
}
}

269
MidtermProject/Midterm.cs Normal file
View File

@ -0,0 +1,269 @@
using System;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace MidtermProject
{
public partial class Midterm : Form
{
// Tax Rates
private const decimal STANDARD_TAX_RATE = 0.06m;
private const decimal INSTATE_TAX_RATE = 0.04m;
// Prices
private const decimal BLUE_COST = 24.99m;
private const decimal YELLOW_COST = 15.97m;
// Running totals
private int transactions;
private int yellowSold;
private int blueSold;
private decimal totalSum;
// Integer Limit Checks
private double dubBlue = 0;
private double dubYellow = 0;
private int track;
private decimal tax = STANDARD_TAX_RATE;
private readonly ErrorProvider ep1 = new ErrorProvider();
public Midterm()
{
InitializeComponent();
LoadForm();
}
private void LoadForm()
{
lblSumBlue.Text = "0";
lblSumYellow.Text = "0";
lblAvg.Text = "0";
lblTransactions.Text = "0";
lblSumGrandTotal.Text = "0";
grpSummary.Visible = false;
btnNext.Enabled = false;
btnCalc.Enabled = false;
btnReset.Enabled = false;
}
private void lblDisAvg_Click(object sender, EventArgs e)
{
// throw new System.NotImplementedException();
}
private void chkSummary_CheckedChanged(object sender, EventArgs e)
{
if (chkSummary.Checked)
grpSummary.Visible = true;
else
grpSummary.Visible = false;
}
private void chkTax_CheckedChanged(object sender, EventArgs e)
{
if (chkTax.Checked)
tax = INSTATE_TAX_RATE;
else
tax = STANDARD_TAX_RATE;
}
private decimal Calculate(int qBlue, int qYellow)
{
decimal cost;
transactions++;
yellowSold += qYellow;
blueSold += qBlue;
dubYellow += qYellow;
dubBlue += qBlue;
cost = qBlue * BLUE_COST * (1 + tax) + qYellow * YELLOW_COST * (1 + tax);
totalSum += cost;
return cost;
}
private void btnCalc_Click(object sender, EventArgs e)
{
Int32 qBlue = 0;
Int32 qYellow = 0;
try
{
try
{
qBlue = int.Parse(txtBlue.Text);
}
catch (Exception exception)
{
ep1.SetError(txtBlue, "Invalid Value");
throw new Exception();
}
try
{
qYellow = int.Parse(txtYellow.Text);
}
catch (Exception exception)
{
ep1.SetError(txtYellow, "Invalid Value");
throw new Exception();
}
// Check to make sure sales dont surpass integer limits
try
{
if (blueSold + qBlue != dubBlue + qBlue)
{
throw new Exception();
}
}
catch (Exception exception)
{
ep1.SetError(txtBlue, "We Can't Sell That Many");
throw;
}
try
{
if (yellowSold + qYellow != dubYellow + qYellow)
{
throw new Exception();
}
}
catch (Exception exception)
{
ep1.SetError(txtYellow, "We Can't Sell That Many");
throw;
}
if (txtBlue.Text.Length > 0 || txtYellow.Text.Length > 0)
try
{
lblTotal.Text = Calculate(qBlue, qYellow).ToString("C");
}
catch (Exception exception)
{
ep1.SetError(btnCalc, "Calculation Error");
}
else
MessageBox.Show("Whoops!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
track++;
}
catch (Exception exception)
{
// Dont Run Calculations
}
UpdateForm();
}
private void UpdateForm()
{
lblSumBlue.Text = blueSold.ToString("N0");
lblSumYellow.Text = yellowSold.ToString("N0");
if (transactions > 0)
{
lblAvg.Text = (totalSum / transactions).ToString("C");
btnReset.Enabled = true;
}
else
{
lblAvg.Text = "0";
btnReset.Enabled = false;
}
lblTransactions.Text = transactions.ToString("N0");
lblSumGrandTotal.Text = totalSum.ToString("C");
if (track > 0)
btnNext.Enabled = true;
else
btnNext.Enabled = false;
if (txtBlue.Text.Length > 0 && txtYellow.Text.Length > 0)
{
btnCalc.Enabled = true;
}
else
{
btnCalc.Enabled = false;
}
}
private void btnExit_Click(object sender, EventArgs e)
{
Close();
}
private void txtBlue_TextChanged(object sender, EventArgs e)
{
UpdateForm();
ep1.Clear();
}
private void btnNext_Click(object sender, EventArgs e)
{
track = 0;
txtBlue.Text = "";
txtYellow.Text = "";
lblTotal.Text = "";
chkTax.Checked = false;
txtBlue.Focus();
UpdateForm();
}
private void txtYellow_TextChanged(object sender, EventArgs e)
{
UpdateForm();
ep1.Clear();
}
private void btnReset_Click(object sender, EventArgs e)
{
DialogResult btnDialog;
string strResponse;
strResponse = "Do you really want to reset all statistics?";
btnDialog = MessageBox.Show(strResponse, "Midterm", MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button2);
if (btnDialog == DialogResult.Yes)
{
transactions = 0;
yellowSold = 0;
blueSold = 0;
totalSum = 0;
track = 0;
txtBlue.Text = "";
txtYellow.Text = "";
lblTotal.Text = "";
}
UpdateForm();
}
}
}

120
MidtermProject/Midterm.resx Normal file
View File

@ -0,0 +1,120 @@
<?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>
</root>

View File

@ -46,14 +46,17 @@
<Reference Include="System.Xml"/> <Reference Include="System.Xml"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Form1.cs"> <Compile Include="Midterm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Form1.Designer.cs"> <Compile Include="Midterm.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>Midterm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Program.cs"/> <Compile Include="Program.cs"/>
<Compile Include="Properties\AssemblyInfo.cs"/> <Compile Include="Properties\AssemblyInfo.cs"/>
<EmbeddedResource Include="Midterm.resx">
<DependentUpon>Midterm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>

View File

@ -16,7 +16,7 @@ namespace MidtermProject
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1()); Application.Run(new Midterm());
} }
} }
} }