Мелкие правки.

This commit is contained in:
Programmist73 2023-02-13 21:53:02 +04:00
parent 09ca448bb0
commit 52e276b9bd
5 changed files with 62 additions and 21 deletions

View File

@ -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;
}
}

View File

@ -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));

View File

@ -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;
}
}

View File

@ -57,4 +57,13 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="ColumnID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ColumnName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ColumnPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@ -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);