From de1c6821c1117632161b0b0904d30e4ec42d1c7d Mon Sep 17 00:00:00 2001 From: Andrea Fiorencis Date: Thu, 12 Feb 2026 09:18:22 +0100 Subject: [PATCH] Aggiunta pulsante "Ingredienti" --- GestionePizzeForm.cs | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/GestionePizzeForm.cs b/GestionePizzeForm.cs index d1ad17c..a902fa5 100644 --- a/GestionePizzeForm.cs +++ b/GestionePizzeForm.cs @@ -12,7 +12,7 @@ namespace PizzaExpress_Client private readonly TextBox _txtId, _txtNome, _txtPrezzo, _txtRicerca, _txtNote; private readonly ComboBox _cmbCategoria, _cmbStato; - private readonly Button _btnAggiungi, _btnAggiorna, _btnElimina, _btnElenco, _btnCosto, _btnNuovaPizza; + private readonly Button _btnAggiungi, _btnAggiorna, _btnElimina, _btnElenco, _btnIngredienti, _btnNuovaPizza; public GestionePizzeForm() { @@ -48,16 +48,16 @@ namespace PizzaExpress_Client AutoSize = true }; - _btnCosto = new Button + _btnIngredienti = new Button { - Text = "Costo", - Location = new Point(900, 15), - Size = new Size(70, 30) + Text = "Ingredienti", + Location = new Point(870, 15), + Size = new Size(104, 30) }; - _btnCosto.Click += BtnCosto_Click; + _btnIngredienti.Click += BtnIngredienti_Click; pnlTop.Controls.Add(lblTitolo); - pnlTop.Controls.Add(_btnCosto); + pnlTop.Controls.Add(_btnIngredienti); // ====================================================== // PANNELLO SINISTRO @@ -361,7 +361,7 @@ namespace PizzaExpress_Client } // ====================================================================== - private void BtnCosto_Click(object? sender, EventArgs e) + private void BtnIngredienti_Click(object? sender, EventArgs e) { if (_lstPizze.SelectedItem == null) { @@ -369,15 +369,7 @@ namespace PizzaExpress_Client return; } - var s = _lstPizze.SelectedItem.ToString(); - var parts = s.Split('-'); - - if (parts.Length >= 3) - { - string nome = parts[1].Trim(); - string prezzo = parts[2].Replace("€", "").Trim(); - MessageBox.Show($"La pizza {nome} costa {prezzo}€."); - } + MessageBox.Show("Funzionalità Ingredienti non ancora implementata."); } private void PulisciCampi()