private void AddPallet() { if (findPalletByName(tb_newPalletName.Text) != null) { MessageBox.Show("This Pallet name is already taken. Please choose another", "InvalidName", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } string[] colors = new string[0]; ExistingPallets.Add(new Pallet(tb_newPalletName.Text, colors)); }
private void deletePallet() { DialogResult results = MessageBox.Show("WAIT!!!!\nAre you sure? This can NOT be undone", "ARE YOU SURE?", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); if (results == DialogResult.OK) { ExistingPallets.Remove(selectedPallet); } else { return; } }