private void CmdAdd_Click(object sender, EventArgs e) { if (txtNomRack.TextLength != 0 && numNbU.Value > 0) { GestionRack.SetRack(txtNomRack.Text, (int)numNbU.Value); } this.Close(); this.Dispose(); }
private void CmdAddRack_Click(object sender, EventArgs e) { FrmAjoutRack f = new FrmAjoutRack(); f.ShowDialog(dcDesign.Parent); Rack r = GestionRack.GetRack(); if (r != null) { Button cmdAddRack = (Button)sender; TableLayoutPanelCellPosition cellNewRack = dcDesign.GetCellPosition(cmdAddRack); dcDesign.ColumnCount++; dcDesign.Controls.Remove(cmdAddRack); dcDesign.Controls.Add(r.GetRackDesign(), cellNewRack.Column, cellNewRack.Row); dcDesign.Controls.Add(cmdAddRack, cellNewRack.Column + 1, cellNewRack.Row); rows[cellNewRack.Row].AddRack(r); } }
private void CmdAnnuler_Click(object sender, EventArgs e) { GestionRack.SetRack("", 0); Close(); }