Exemplo n.º 1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Handles the CellValueChanged event of the gridProperties control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellEventArgs"/> instance containing the event data.</param>
 /// ------------------------------------------------------------------------------------
 void gridProperties_CellValueChanged(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 0 && e.RowIndex >= 0)
     {
         DataGridViewCellCollection cells = gridProperties.Rows[e.RowIndex].Cells;
         LCMClassProperty           prop  = cells[2].Value as LCMClassProperty;
         prop.Displayed = (bool)cells[0].Value;
     }
 }
Exemplo n.º 2
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Handles the CellFormatting event of the gridProperties control.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 private void gridProperties_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
 {
     if (e.ColumnIndex == 1 && e.RowIndex >= 0 && !m_showCmObjProps)
     {
         DataGridViewCellCollection cells = gridProperties.Rows[e.RowIndex].Cells;
         LCMClassProperty           prop  = cells[2].Value as LCMClassProperty;
         if (LCMClassList.IsCmObjectProperty(prop.Name))
         {
             e.CellStyle.ForeColor = SystemColors.GrayText;
         }
     }
 }