private void btnEditPerson_Click(object sender, EventArgs e)
 {
     frmEditPerson person = new frmEditPerson();
     person.MainForm = this.MainForm;
     PersonList list = new PersonList();
     list.Add(this.clbPersons.SelectedItem as Person);
     person.Persons = list;
     person.AllPersons = this.editingArchitecture.Scenario.Persons;
     person.ShowDialog();
 }
 private void EditPersons()
 {
     if ((this.Persons != null) && (this.Persons.Count != 0))
     {
         PersonList list = new PersonList();
         for (int i = 0; i < this.dgvPersons.SelectedRows.Count; i++)
         {
             list.Add(this.dgvPersons.SelectedRows[i].DataBoundItem as Person);
         }
         frmEditPerson person = new frmEditPerson();
         person.Owner = this;
         person.MainForm = this.MainForm;
         person.Persons = list;
         person.SetTabIndex(this.EditPersonTabIndex);
         person.AllPersons = this.Persons;
         person.ShowDialog();
         this.dgvPersons.Invalidate();
     }
 }