void OutputListAddItem(object sender, EventArgs e) { Output_Designer od = new Output_Designer(); od.ShowDialog(); if (od.DialogResult == DialogResult.OK) { listBox2.Items.Add(od.ol.ToString()); LogInfo("Added new output location"); } }
void EditOutput(object sender, EventArgs e) { Output_Designer od = new Output_Designer(listBox2.Items[listBox2.SelectedIndex].ToString()); od.ShowDialog(); if (od.DialogResult == DialogResult.OK) { listBox2.Items.RemoveAt(listBox2.SelectedIndex); listBox2.Items.Add(od.ol.ToString()); LogInfo($"Updated output location [{listBox2.SelectedIndex}]"); } }