commit a7c02cf29ff4bde0e979638fbd65d4f17fa9d252 Author: chrisbell Date: Tue Apr 29 21:11:49 2025 -0500 init diff --git a/C968Project.sln b/C968Project.sln new file mode 100644 index 0000000..811a2ef --- /dev/null +++ b/C968Project.sln @@ -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 diff --git a/C968Project/C968Project.csproj b/C968Project/C968Project.csproj new file mode 100644 index 0000000..ec2b961 --- /dev/null +++ b/C968Project/C968Project.csproj @@ -0,0 +1,17 @@ + + + + WinExe + net9.0-windows + enable + true + enable + + + + + Form + + + + \ No newline at end of file diff --git a/C968Project/C968Project.csproj.user b/C968Project/C968Project.csproj.user new file mode 100644 index 0000000..317a8c7 --- /dev/null +++ b/C968Project/C968Project.csproj.user @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/C968Project/Inhouse.cs b/C968Project/Inhouse.cs new file mode 100644 index 0000000..a268658 --- /dev/null +++ b/C968Project/Inhouse.cs @@ -0,0 +1,6 @@ +namespace C968Project; + +public class Inhouse : Part +{ + public int MachineID { get; set; } +} \ No newline at end of file diff --git a/C968Project/Inventory.cs b/C968Project/Inventory.cs new file mode 100644 index 0000000..a8a18c9 --- /dev/null +++ b/C968Project/Inventory.cs @@ -0,0 +1,38 @@ +using System.ComponentModel; + +namespace C968Project; + +public class Inventory +{ + public BindingList Products { get; set; } + public BindingList 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){} + +} \ No newline at end of file diff --git a/C968Project/Outsourced.cs b/C968Project/Outsourced.cs new file mode 100644 index 0000000..b09201b --- /dev/null +++ b/C968Project/Outsourced.cs @@ -0,0 +1,6 @@ +namespace C968Project; + +public class Outsourced : Part +{ + public string CompanyName { get; set; } +} \ No newline at end of file diff --git a/C968Project/Part.cs b/C968Project/Part.cs new file mode 100644 index 0000000..e2fe568 --- /dev/null +++ b/C968Project/Part.cs @@ -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; } +} \ No newline at end of file diff --git a/C968Project/Product.cs b/C968Project/Product.cs new file mode 100644 index 0000000..5bb79e4 --- /dev/null +++ b/C968Project/Product.cs @@ -0,0 +1,26 @@ +using System.ComponentModel; + +namespace C968Project; + +public class Product +{ + public BindingList 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; + } +} \ No newline at end of file diff --git a/C968Project/Program.cs b/C968Project/Program.cs new file mode 100644 index 0000000..b4a9560 --- /dev/null +++ b/C968Project/Program.cs @@ -0,0 +1,18 @@ +using C968Project.Views; + +namespace C968Project; + +static class Program +{ + /// + /// The main entry point for the application. + /// + [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()); + } +} \ No newline at end of file diff --git a/C968Project/Views/MainScreen.Designer.cs b/C968Project/Views/MainScreen.Designer.cs new file mode 100644 index 0000000..8728589 --- /dev/null +++ b/C968Project/Views/MainScreen.Designer.cs @@ -0,0 +1,79 @@ +using System.ComponentModel; + +namespace C968Project.Views; + +partial class MainScreen +{ + /// + /// Required designer variable. + /// + private IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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 +} \ No newline at end of file diff --git a/C968Project/Views/MainScreen.cs b/C968Project/Views/MainScreen.cs new file mode 100644 index 0000000..620e748 --- /dev/null +++ b/C968Project/Views/MainScreen.cs @@ -0,0 +1,9 @@ +namespace C968Project.Views; + +public partial class MainScreen : Form +{ + public MainScreen() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/C968Project/Views/MainScreen.resx b/C968Project/Views/MainScreen.resx new file mode 100644 index 0000000..8b2ff64 --- /dev/null +++ b/C968Project/Views/MainScreen.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file