private void projectSettingsToolStripMenuItem_Click(object sender, EventArgs e) { ProgectSettingForm settingForm = new ProgectSettingForm(); PropertyGrid propertyGridProjectSettings = (PropertyGrid) settingForm.Controls.Find("propertyGridProjectSettings", true).First(); propertyGridProjectSettings.SelectedObject = this.progectSettings; settingForm.Show(); }
private void dataGridNodesTable_CellContentClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex != -1 && e.ColumnIndex != -1) { DataGridViewCell cell = dataGridNodesTable.Rows[e.RowIndex].Cells[e.ColumnIndex]; if (cell.Value != null && cell.Value.ToString() == "...") { ProgectSettingForm psForm = new ProgectSettingForm(); PropertyGrid propertyGridProjectSettings = (PropertyGrid) psForm.Controls.Find("propertyGridProjectSettings", true).First(); DataRowComponents source = (DataRowComponents)dataGridNodesTable.Rows[e.RowIndex].Cells["DataSource"].Value; propertyGridProjectSettings.SelectedObject = source; psForm.Show(); } } }