private void btnAddIncludePath_Click(object sender, EventArgs e) { IndexingPathForm dlg = new IndexingPathForm(); DialogResult dr = dlg.ShowDialog(this); if (dr == DialogResult.OK) { this.lbIncludedPath.Items.Add(dlg.IndexingPath); } }
private void btnEdit_Click(object sender, EventArgs e) { IndexingPath path = this.lbIncludedPath.SelectedItem as IndexingPath; IndexingPathForm dlg = new IndexingPathForm(); dlg.SetIndexingPath(path); DialogResult dr = dlg.ShowDialog(this); if (dr == DialogResult.OK) { this.lbIncludedPath.Items[this.lbIncludedPath.SelectedIndex] = path; } }