private void tsbOpeningTypes_Click(object sender, EventArgs e)
        {
            Building      building         = (Building)_parentObject;
            var           detailObjectList = new DetailObjectList("OpeningTypes", building, building.OpeningTypeList, false);
            frmDetailList DetailForm       = new frmDetailList(detailObjectList);

            this.Visible = false;
            DetailForm.ShowDialog();
            this.Visible = true;
        }
        private void tsbWallType_Click(object sender, EventArgs e)
        {
            Building      building         = (Building)_parentObject;
            var           detailObjectList = new DetailObjectList("WallTypes", building, building.WallTypeList, false);
            frmDetailList DetailForm       = new frmDetailList(detailObjectList);

            this.Visible = false;
            DetailForm.ShowDialog();
            this.Visible = true;
            foreach (ListViewItem i in lvDetails.Items)
            {
                EditItemFromLevel(i, building.LevelList[i.Index]);
            }
        }
 private void tsbOpenings_Click(object sender, EventArgs e)
 {
     if (lvDetails.SelectedIndices.Count == 1)
     {
         Wall wall;
         foreach (int i in lvDetails.SelectedIndices)
         {
             wall = ((List <Wall>)_objectList)[i];
             var           detailObjectList = new DetailObjectList("OpeningPlacings", wall, wall.OpeningPlacingList, false);
             frmDetailList DetailForm       = new frmDetailList(detailObjectList);
             this.Visible = false;
             DetailForm.ShowDialog();
             this.Visible = true;
             EditItemFromWall(lvDetails.Items[i], wall);
         }
     }
     else
     {
         MessageBox.Show("Выберите один элемент из списка", "Неверный выбор");
     }
 }
 private void tsbWalls_Click(object sender, EventArgs e)
 {
     if (lvDetails.SelectedIndices.Count == 1)
     {
         Level level;
         foreach (int i in lvDetails.SelectedIndices)
         {
             level = ((List <Level>)_objectList)[i];
             var           detailObjectList = new DetailObjectList("Walls", level, level.WallList, false);
             frmDetailList DetailForm       = new frmDetailList(detailObjectList);
             this.Visible = false;
             DetailForm.ShowDialog();
             this.Visible = true;
             EditItemFromLevel(lvDetails.Items[i], level);
         }
     }
     else
     {
         MessageBox.Show("Выберите один элемент из списка", "Неверный выбор");
     }
 }