diff --git a/IceCreamShop/IceCreamShop/FormMain.Designer.cs b/IceCreamShop/IceCreamShop/FormMain.Designer.cs index fa29d0a..3b2da95 100644 --- a/IceCreamShop/IceCreamShop/FormMain.Designer.cs +++ b/IceCreamShop/IceCreamShop/FormMain.Designer.cs @@ -42,6 +42,7 @@ this.iceCreamComponentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.iceCreamToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ordersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.клиентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); this.menuStrip.SuspendLayout(); this.SuspendLayout(); @@ -123,7 +124,8 @@ // this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.компонентыToolStripMenuItem, - this.мороженоеToolStripMenuItem}); + this.мороженоеToolStripMenuItem, + this.клиентыToolStripMenuItem}); this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem"; this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(117, 24); this.справочникиToolStripMenuItem.Text = "Справочники"; @@ -131,14 +133,14 @@ // компонентыToolStripMenuItem // this.компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem"; - this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(182, 26); + this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(224, 26); this.компонентыToolStripMenuItem.Text = "Компоненты"; this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click); // // мороженоеToolStripMenuItem // this.мороженоеToolStripMenuItem.Name = "мороженоеToolStripMenuItem"; - this.мороженоеToolStripMenuItem.Size = new System.Drawing.Size(182, 26); + this.мороженоеToolStripMenuItem.Size = new System.Drawing.Size(224, 26); this.мороженоеToolStripMenuItem.Text = "Мороженое"; this.мороженоеToolStripMenuItem.Click += new System.EventHandler(this.мороженоеToolStripMenuItem_Click); // @@ -173,6 +175,13 @@ this.ordersToolStripMenuItem.Text = "Список заказов"; this.ordersToolStripMenuItem.Click += new System.EventHandler(this.OrdersToolStripMenuItem_Click); // + // клиентыToolStripMenuItem + // + this.клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem"; + this.клиентыToolStripMenuItem.Size = new System.Drawing.Size(224, 26); + this.клиентыToolStripMenuItem.Text = "Клиенты"; + this.клиентыToolStripMenuItem.Click += new System.EventHandler(this.клиентыToolStripMenuItem_Click); + // // FormMain // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); @@ -213,5 +222,6 @@ private ToolStripMenuItem iceCreamComponentsToolStripMenuItem; private ToolStripMenuItem iceCreamToolStripMenuItem; private ToolStripMenuItem ordersToolStripMenuItem; + private ToolStripMenuItem клиентыToolStripMenuItem; } } \ No newline at end of file diff --git a/IceCreamShop/IceCreamShop/FormMain.cs b/IceCreamShop/IceCreamShop/FormMain.cs index cf93104..172e9b5 100644 --- a/IceCreamShop/IceCreamShop/FormMain.cs +++ b/IceCreamShop/IceCreamShop/FormMain.cs @@ -195,5 +195,14 @@ namespace IceCreamShopView form.ShowDialog(); } } + + private void клиентыToolStripMenuItem_Click(object sender, EventArgs e) + { + var service = Program.ServiceProvider?.GetService(typeof(FormClients)); + if (service is FormClients form) + { + form.ShowDialog(); + } + } } }