private void btnEdit_Click(object sender, EventArgs e) { Lake lake = (Lake)bindSrcLakes.List[bindSrcLakes.Position]; LakeForm lf = new LakeForm(lake); if (lf.ShowDialog() == DialogResult.OK) { bindSrcLakes.List[bindSrcLakes.Position] = lake; } }
private void btnAdd_Click(object sender, EventArgs e) { Lake lake = new Lake(); LakeForm lf = new LakeForm(lake); if (lf.ShowDialog() == DialogResult.OK) { bindSrcLakes.Add(lake); } }