init
This commit is contained in:
commit
a7c02cf29f
16
C968Project.sln
Normal file
16
C968Project.sln
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C968Project", "C968Project\C968Project.csproj", "{922C1DA2-F3DE-4A96-A156-8CD76DFB0279}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{922C1DA2-F3DE-4A96-A156-8CD76DFB0279}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{922C1DA2-F3DE-4A96-A156-8CD76DFB0279}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{922C1DA2-F3DE-4A96-A156-8CD76DFB0279}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{922C1DA2-F3DE-4A96-A156-8CD76DFB0279}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
17
C968Project/C968Project.csproj
Normal file
17
C968Project/C968Project.csproj
Normal file
@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Views\MainScreen.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
2
C968Project/C968Project.csproj.user
Normal file
2
C968Project/C968Project.csproj.user
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
6
C968Project/Inhouse.cs
Normal file
6
C968Project/Inhouse.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace C968Project;
|
||||
|
||||
public class Inhouse : Part
|
||||
{
|
||||
public int MachineID { get; set; }
|
||||
}
|
38
C968Project/Inventory.cs
Normal file
38
C968Project/Inventory.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace C968Project;
|
||||
|
||||
public class Inventory
|
||||
{
|
||||
public BindingList<Product> Products { get; set; }
|
||||
public BindingList<Part> Parts { get; set; }
|
||||
|
||||
public void AddProduct(Product product){}
|
||||
|
||||
public bool RemoveProduct(int productIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public Product LookupProduct(int partIndex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public void UpdateProduct(int index, Product newProduct){}
|
||||
|
||||
|
||||
public void AddPart(Part part){}
|
||||
|
||||
public bool DeletePart(Part part)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public Part LookupPart(int partIndex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void UpdatePart(int index, Part newPart){}
|
||||
|
||||
}
|
6
C968Project/Outsourced.cs
Normal file
6
C968Project/Outsourced.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace C968Project;
|
||||
|
||||
public class Outsourced : Part
|
||||
{
|
||||
public string CompanyName { get; set; }
|
||||
}
|
11
C968Project/Part.cs
Normal file
11
C968Project/Part.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace C968Project;
|
||||
|
||||
public abstract class Part
|
||||
{
|
||||
public int PartID { get; set; }
|
||||
public string Name { get; set; }
|
||||
public float Price { get; set; }
|
||||
public int InStock { get; set; }
|
||||
public int Min { get; set; }
|
||||
public int Max { get; set; }
|
||||
}
|
26
C968Project/Product.cs
Normal file
26
C968Project/Product.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace C968Project;
|
||||
|
||||
public class Product
|
||||
{
|
||||
public BindingList<Part> AssociatedParts { get; set; }
|
||||
public int ProductId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public float Price { get; set; }
|
||||
public int InStock { get; set; }
|
||||
public int Min { get; set; }
|
||||
public int Max { get; set; }
|
||||
|
||||
public void AddAssociatedPart(Part part){}
|
||||
|
||||
public bool RemoveAssociatedPart(int partIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public Part LookupAssociatedPart(int partIndex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
18
C968Project/Program.cs
Normal file
18
C968Project/Program.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using C968Project.Views;
|
||||
|
||||
namespace C968Project;
|
||||
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new MainScreen());
|
||||
}
|
||||
}
|
79
C968Project/Views/MainScreen.Designer.cs
generated
Normal file
79
C968Project/Views/MainScreen.Designer.cs
generated
Normal file
@ -0,0 +1,79 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace C968Project.Views;
|
||||
|
||||
partial class MainScreen
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
panel1 = new System.Windows.Forms.Panel();
|
||||
dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.AutoSize = true;
|
||||
panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
panel1.Controls.Add(dataGridView1);
|
||||
panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
panel1.Location = new System.Drawing.Point(0, 0);
|
||||
panel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new System.Drawing.Size(929, 450);
|
||||
panel1.TabIndex = 0;
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Location = new System.Drawing.Point(10, 9);
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.Size = new System.Drawing.Size(467, 334);
|
||||
dataGridView1.TabIndex = 0;
|
||||
dataGridView1.Text = "dataGridView1";
|
||||
//
|
||||
// MainScreen
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(929, 450);
|
||||
Controls.Add(panel1);
|
||||
Text = "Main Screen";
|
||||
panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
|
||||
#endregion
|
||||
}
|
9
C968Project/Views/MainScreen.cs
Normal file
9
C968Project/Views/MainScreen.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace C968Project.Views;
|
||||
|
||||
public partial class MainScreen : Form
|
||||
{
|
||||
public MainScreen()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
120
C968Project/Views/MainScreen.resx
Normal file
120
C968Project/Views/MainScreen.resx
Normal 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>
|
Loading…
Reference in New Issue
Block a user