main form fix

This commit is contained in:
Никита Волков 2024-04-16 23:12:48 +04:00
parent c106704f19
commit 3f16a1bd0e
2 changed files with 30 additions and 12 deletions

View File

@ -30,8 +30,8 @@
{
menuStrip = new MenuStrip();
dictionaryToolStripMenuItem = new ToolStripMenuItem();
computerToolStripMenuItem = new ToolStripMenuItem();
componentsToolStripMenuItem = new ToolStripMenuItem();
computerToolStripMenuItem = new ToolStripMenuItem();
clientsToolStripMenuItem = new ToolStripMenuItem();
implementersToolStripMenuItem = new ToolStripMenuItem();
отчётыToolStripMenuItem = new ToolStripMenuItem();
@ -43,13 +43,14 @@
buttonCreateOrder = new Button();
buttonIssuedOrder = new Button();
buttonRef = new Button();
почтаToolStripMenuItem = new ToolStripMenuItem();
menuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
//
// menuStrip
//
menuStrip.Items.AddRange(new ToolStripItem[] { dictionaryToolStripMenuItem, отчётыToolStripMenuItem, doWorkToolStripMenuItem });
menuStrip.Items.AddRange(new ToolStripItem[] { dictionaryToolStripMenuItem, отчётыToolStripMenuItem, doWorkToolStripMenuItem, почтаToolStripMenuItem });
menuStrip.Location = new Point(0, 0);
menuStrip.Name = "menuStrip";
menuStrip.Size = new Size(1047, 24);
@ -63,31 +64,31 @@
dictionaryToolStripMenuItem.Size = new Size(94, 20);
dictionaryToolStripMenuItem.Text = "Справочники";
//
// computerToolStripMenuItem
//
computerToolStripMenuItem.Name = "computerToolStripMenuItem";
computerToolStripMenuItem.Size = new Size(180, 22);
computerToolStripMenuItem.Text = "Компьютеры";
computerToolStripMenuItem.Click += ComputersToolStripMenuItem_Click;
//
// componentsToolStripMenuItem
//
componentsToolStripMenuItem.Name = "componentsToolStripMenuItem";
componentsToolStripMenuItem.Size = new Size(180, 22);
componentsToolStripMenuItem.Size = new Size(149, 22);
componentsToolStripMenuItem.Text = "Компоненты";
componentsToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click;
//
// computerToolStripMenuItem
//
computerToolStripMenuItem.Name = "computerToolStripMenuItem";
computerToolStripMenuItem.Size = new Size(149, 22);
computerToolStripMenuItem.Text = "Компьютеры";
computerToolStripMenuItem.Click += ComputersToolStripMenuItem_Click;
//
// clientsToolStripMenuItem
//
clientsToolStripMenuItem.Name = "clientsToolStripMenuItem";
clientsToolStripMenuItem.Size = new Size(180, 22);
clientsToolStripMenuItem.Size = new Size(149, 22);
clientsToolStripMenuItem.Text = "Клиенты";
clientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click;
//
// implementersToolStripMenuItem
//
implementersToolStripMenuItem.Name = "implementersToolStripMenuItem";
implementersToolStripMenuItem.Size = new Size(180, 22);
implementersToolStripMenuItem.Size = new Size(149, 22);
implementersToolStripMenuItem.Text = "Исполнители";
implementersToolStripMenuItem.Click += ImplementersToolStripMenuItem_Click;
//
@ -165,6 +166,13 @@
buttonRef.UseVisualStyleBackColor = true;
buttonRef.Click += ButtonRef_Click;
//
// почтаToolStripMenuItem
//
почтаToolStripMenuItem.Name = "почтаToolStripMenuItem";
почтаToolStripMenuItem.Size = new Size(53, 20);
почтаToolStripMenuItem.Text = "Почта";
почтаToolStripMenuItem.Click += почтаToolStripMenuItem_Click;
//
// FormMain
//
AutoScaleDimensions = new SizeF(7F, 15F);
@ -203,5 +211,6 @@
private ToolStripMenuItem clientsToolStripMenuItem;
private ToolStripMenuItem implementersToolStripMenuItem;
private ToolStripMenuItem doWorkToolStripMenuItem;
private ToolStripMenuItem почтаToolStripMenuItem;
}
}

View File

@ -229,6 +229,15 @@ namespace ComputersShopView
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void почтаToolStripMenuItem_Click(object sender, EventArgs e)
{
var service = Program.ServiceProvider?.GetService(typeof(FormMails));
if (service is FormMails form)
{
form.ShowDialog();
}
}
private void ButtonRef_Click(object sender, EventArgs e)
{
LoadData();