From 52e276b9bd5776b63346e0f64668246cf43c234c Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Mon, 13 Feb 2023 21:53:02 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BlacksmithWorkshop/FormMain.Designer.cs | 32 ++++++++--------- .../BlacksmithWorkshop/FormMain.cs | 6 ++-- .../FormManufacture.Designer.cs | 34 ++++++++++++++++++- .../BlacksmithWorkshop/FormManufacture.resx | 9 +++++ .../FormWorkPieces.Designer.cs | 2 +- 5 files changed, 62 insertions(+), 21 deletions(-) diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs index b200bf0..fbe5a08 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.Designer.cs @@ -36,8 +36,8 @@ this.buttonRef = new System.Windows.Forms.Button(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.заготовкиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.изделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.workPieceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.manufactureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); this.menuStrip1.SuspendLayout(); this.SuspendLayout(); @@ -116,25 +116,25 @@ // toolStripMenuItem // this.toolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.заготовкиToolStripMenuItem, - this.изделияToolStripMenuItem}); + this.workPieceToolStripMenuItem, + this.manufactureToolStripMenuItem}); this.toolStripMenuItem.Name = "toolStripMenuItem"; this.toolStripMenuItem.Size = new System.Drawing.Size(117, 24); this.toolStripMenuItem.Text = "Справочники"; // - // заготовкиToolStripMenuItem + // workPieceToolStripMenuItem // - this.заготовкиToolStripMenuItem.Name = "заготовкиToolStripMenuItem"; - this.заготовкиToolStripMenuItem.Size = new System.Drawing.Size(162, 26); - this.заготовкиToolStripMenuItem.Text = "Заготовки"; - this.заготовкиToolStripMenuItem.Click += new System.EventHandler(this.ЗаготовкиToolStripMenuItem_Click); + this.workPieceToolStripMenuItem.Name = "workPieceToolStripMenuItem"; + this.workPieceToolStripMenuItem.Size = new System.Drawing.Size(224, 26); + this.workPieceToolStripMenuItem.Text = "Заготовки"; + this.workPieceToolStripMenuItem.Click += new System.EventHandler(this.WorkPieceToolStripMenuItem_Click); // - // изделияToolStripMenuItem + // manufactureToolStripMenuItem // - this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem"; - this.изделияToolStripMenuItem.Size = new System.Drawing.Size(162, 26); - this.изделияToolStripMenuItem.Text = "Изделия"; - this.изделияToolStripMenuItem.Click += new System.EventHandler(this.ИзделияToolStripMenuItem_Click); + this.manufactureToolStripMenuItem.Name = "manufactureToolStripMenuItem"; + this.manufactureToolStripMenuItem.Size = new System.Drawing.Size(224, 26); + this.manufactureToolStripMenuItem.Text = "Изделия"; + this.manufactureToolStripMenuItem.Click += new System.EventHandler(this.ManufactureToolStripMenuItem_Click); // // FormMain // @@ -170,7 +170,7 @@ private Button buttonRef; private MenuStrip menuStrip1; private ToolStripMenuItem toolStripMenuItem; - private ToolStripMenuItem заготовкиToolStripMenuItem; - private ToolStripMenuItem изделияToolStripMenuItem; + private ToolStripMenuItem workPieceToolStripMenuItem; + private ToolStripMenuItem manufactureToolStripMenuItem; } } \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs index 5d90425..cef0744 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMain.cs @@ -55,17 +55,17 @@ namespace BlacksmithWorkshop } } - private void ЗаготовкиToolStripMenuItem_Click(object sender, EventArgs e) + private void WorkPieceToolStripMenuItem_Click(object sender, EventArgs e) { var service = Program.ServiceProvider?.GetService(typeof(FormWorkPieces)); - if(service is FormWorkPieces form) + if (service is FormWorkPieces form) { form.ShowDialog(); } } - private void ИзделияToolStripMenuItem_Click(object sender, EventArgs e) + private void ManufactureToolStripMenuItem_Click(object sender, EventArgs e) { var service = Program.ServiceProvider?.GetService(typeof(FormManufacture)); diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.Designer.cs index dc55b46..916f3d3 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.Designer.cs @@ -40,6 +40,9 @@ this.dataGridView = new System.Windows.Forms.DataGridView(); this.buttonSave = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); + this.ColumnID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColumnName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColumnPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBoxWorkPiece.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); this.SuspendLayout(); @@ -133,11 +136,15 @@ // dataGridView // this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.ColumnID, + this.ColumnName, + this.ColumnPrice}); this.dataGridView.Location = new System.Drawing.Point(6, 26); this.dataGridView.Name = "dataGridView"; this.dataGridView.RowHeadersWidth = 51; this.dataGridView.RowTemplate.Height = 29; - this.dataGridView.Size = new System.Drawing.Size(416, 268); + this.dataGridView.Size = new System.Drawing.Size(436, 268); this.dataGridView.TabIndex = 0; // // buttonSave @@ -160,6 +167,28 @@ this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click); // + // ColumnID + // + this.ColumnID.HeaderText = "Id"; + this.ColumnID.MinimumWidth = 6; + this.ColumnID.Name = "ColumnID"; + this.ColumnID.Visible = false; + this.ColumnID.Width = 125; + // + // ColumnName + // + this.ColumnName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.ColumnName.HeaderText = "Название"; + this.ColumnName.MinimumWidth = 6; + this.ColumnName.Name = "ColumnName"; + // + // ColumnPrice + // + this.ColumnPrice.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.ColumnPrice.HeaderText = "Количество"; + this.ColumnPrice.MinimumWidth = 6; + this.ColumnPrice.Name = "ColumnPrice"; + // // FormManufacture // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); @@ -196,5 +225,8 @@ private DataGridView dataGridView; private Button buttonSave; private Button buttonCancel; + private DataGridViewTextBoxColumn ColumnID; + private DataGridViewTextBoxColumn ColumnName; + private DataGridViewTextBoxColumn ColumnPrice; } } \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.resx b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.resx index f298a7b..fb971ef 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.resx +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormManufacture.resx @@ -57,4 +57,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + + + True + \ No newline at end of file diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormWorkPieces.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormWorkPieces.Designer.cs index 4c90cfd..be21959 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormWorkPieces.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormWorkPieces.Designer.cs @@ -97,7 +97,7 @@ this.Controls.Add(this.buttonUpd); this.Controls.Add(this.buttonAdd); this.Name = "FormWorkPieces"; - this.Text = "Компоненты"; + this.Text = "Заготовки"; this.Load += new System.EventHandler(this.FormWorkPiece_Load); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); this.ResumeLayout(false);