private void button8_Click(object sender, EventArgs e) { DirectionCart directionCart = new DirectionCart(Direction.directions.ElementAt(listBox1.SelectedIndex)); directionCart.Show(); directionCart.FormClosing += (object sender1, FormClosingEventArgs e1) => RefreshCells(); }
private void button10_Click(object sender, EventArgs e) { Direction newDirection = new Direction(); Direction.directions.Add(newDirection); DirectionCart directionCart = new DirectionCart(newDirection); directionCart.Show(); directionCart.FormClosing += (object sender1, FormClosingEventArgs e1) => RefreshCells(); }