/// <summary> /// When the RoofEditorForm was loaded, then initialize data of the controls in the form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RoofEditorForm_Load(object sender, EventArgs e) { this.roofTypesComboBox.DataSource = m_roofsManager.RoofTypes; this.roofTypesComboBox.DisplayMember = "Name"; this.roofTypesComboBox.ValueMember = "Id"; this.roofTypesComboBox.DropDownStyle = ComboBoxStyle.DropDownList; this.roofTypesComboBox.SelectedValue = m_roof.RoofType.Id; if (m_roof is FootPrintRoof) { this.roofEditorPropertyGrid.SelectedObject = m_footPrintRoofWrapper; this.Size = new Size(814, 515); Label label = new Label(); label.Text = "Footprint roof lines:"; label.AutoSize = true; label.Location = new System.Drawing.Point(398, 12); this.Controls.Add(label); m_graphicsControl = new GraphicsControl(m_footPrintRoofWrapper); m_graphicsControl.Location = new System.Drawing.Point(398, 36); m_graphicsControl.Size = new Size(400, 440); this.Controls.Add(m_graphicsControl); } else { this.roofEditorPropertyGrid.SelectedObject = m_extrusionRoofWrapper; } this.roofEditorPropertyGrid.ExpandAllGridItems(); }