Баг с отображением устранен

This commit is contained in:
Никита Потапов 2024-02-26 00:47:21 +04:00
parent a204cc5e69
commit 3e34afb54b
9 changed files with 10 additions and 13 deletions

@ -101,6 +101,7 @@
Controls.Add(textBoxComponentName);
Name = "FormComponent";
Text = "Компонент";
Load += FormComponent_Load;
ResumeLayout(false);
PerformLayout();
}

@ -107,6 +107,7 @@
Controls.Add(dataGridViewComponents);
Name = "FormComponents";
Text = "Компоненты";
Load += FormComponents_Load;
((System.ComponentModel.ISupportInitialize)dataGridViewComponents).EndInit();
ResumeLayout(false);
}

@ -56,8 +56,7 @@ namespace SecuritySystemView
var service = Program.ServiceProvider?.GetService(typeof(FormComponent));
if (service is FormComponent form)
{
form.Id =
Convert.ToInt32(dataGridViewComponents.SelectedRows[0].Cells["Id"].Value);
form.Id = Convert.ToInt32(dataGridViewComponents.SelectedRows[0].Cells["Id"].Value);
if (form.ShowDialog() == DialogResult.OK)
{
LoadData();

@ -126,6 +126,7 @@
Controls.Add(labelSecureName);
Name = "FormCreateOrder";
Text = "Создание заказа";
Load += FormCreateOrder_Load;
ResumeLayout(false);
PerformLayout();
}

@ -62,14 +62,14 @@
// ComponentsToolStripMenuItem
//
ComponentsToolStripMenuItem.Name = "ComponentsToolStripMenuItem";
ComponentsToolStripMenuItem.Size = new Size(224, 26);
ComponentsToolStripMenuItem.Size = new Size(182, 26);
ComponentsToolStripMenuItem.Text = "Компоненты";
ComponentsToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click;
//
// SecuresToolStripMenuItem
//
SecuresToolStripMenuItem.Name = "SecuresToolStripMenuItem";
SecuresToolStripMenuItem.Size = new Size(224, 26);
SecuresToolStripMenuItem.Size = new Size(182, 26);
SecuresToolStripMenuItem.Text = "Изделия";
SecuresToolStripMenuItem.Click += SecuresToolStripMenuItem_Click;
//
@ -154,6 +154,7 @@
MainMenuStrip = menuStrip;
Name = "FormMain";
Text = "Системы безопасности";
Load += FormMain_Load;
menuStrip.ResumeLayout(false);
menuStrip.PerformLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();

@ -202,6 +202,7 @@
Controls.Add(labelSecureName);
Name = "FormSecure";
Text = "Изделие";
Load += FormSecure_Load;
groupBoxComponentsControl.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);

@ -126,13 +126,4 @@
<metadata name="ColumnCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<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="ColumnCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

@ -105,6 +105,7 @@
Controls.Add(dataGridView);
Name = "FormSecures";
Text = "Иделия";
Load += FormSecures_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);
}

@ -28,6 +28,7 @@ namespace SecuritySystemView
dataGridView.DataSource = list;
dataGridView.Columns["Id"].Visible = false;
dataGridView.Columns["SecureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
dataGridView.Columns["SecureComponents"].Visible = false;
}
_logger.LogInformation("Загрузка изделий");
}