private void addNewShareToolStripMenuItem_Click(object sender, EventArgs e) { ShareForm nsf = new ShareForm(); nsf.ShowDialog(); sharesListBox.Update(); }
private void editShareBtn_Click(object sender, EventArgs e) { NetworkShare[] shareBuffer = new NetworkShare[sharesListBox.SelectedItems.Count]; int i = 0; foreach (Object item in sharesListBox.SelectedItems) { NetworkShare share = (NetworkShare)item; shareBuffer[i] = share; i++; } foreach (NetworkShare share in shareBuffer) { ShareForm sf = new ShareForm(share); sf.ShowDialog(); } }