private void EditToolStripMenuItemClick(object sender, EventArgs e) { foreach (Form a in Application.OpenForms) { if (!(a is AddForm)) { continue; } a.Close(); } var form = new AddForm(List.SelectedItems[0].Text, List.SelectedItems[0].SubItems[1].Text, List.SelectedItems[0].SubItems[2].Text, List.SelectedItems[0].SubItems[3].Text, List.SelectedItems[0].SubItems[4].Text, List.SelectedItems[0].SubItems[5].Text, List.SelectedItems[0].SubItems[6].Text, List.SelectedItems[0].SubItems[7].Text, List.SelectedItems[0].SubItems[8].Text, List.SelectedItems[0].SubItems[9].Text, List.SelectedItems[0].SubItems[10].Text, List.SelectedItems[0].SubItems[11].Text); form.Show(); }
private void AddContactToolStripMenuItemClick(object sender, EventArgs e) { var isopen = false; foreach (Form a in Application.OpenForms) { if (!(a is AddForm)) { continue; } isopen = true; Showform(a); } if (isopen) { return; } var form = new AddForm(); form.Show(); }
private void EditToolStripMenuItemClick(object sender, EventArgs e) { foreach(Form a in Application.OpenForms) { if(!(a is AddForm)) continue; a.Close(); } var form = new AddForm(List.SelectedItems[0].Text, List.SelectedItems[0].SubItems[1].Text, List.SelectedItems[0].SubItems[2].Text, List.SelectedItems[0].SubItems[3].Text, List.SelectedItems[0].SubItems[4].Text, List.SelectedItems[0].SubItems[5].Text, List.SelectedItems[0].SubItems[6].Text, List.SelectedItems[0].SubItems[7].Text, List.SelectedItems[0].SubItems[8].Text, List.SelectedItems[0].SubItems[9].Text, List.SelectedItems[0].SubItems[10].Text, List.SelectedItems[0].SubItems[11].Text); form.Show(); }
private void AddContactToolStripMenuItemClick(object sender, EventArgs e) { var isopen = false; foreach(Form a in Application.OpenForms) { if(!(a is AddForm)) continue; isopen = true; Showform(a); } if(isopen) return; var form = new AddForm(); form.Show(); }