Exemplo n.º 1
0
 private void UpdateButtonColor()
 {
     try
     {
         string selectedMatPropKey = propertiesListView.SelectedItems[0].Text;
         colorSelect.BackColor = Color.FromArgb(255,
                                                ColorTools.FloatToIntClamp(currentMaterialList[currentMatIndex].entries[selectedMatPropKey][0]),
                                                ColorTools.FloatToIntClamp(currentMaterialList[currentMatIndex].entries[selectedMatPropKey][1]),
                                                ColorTools.FloatToIntClamp(currentMaterialList[currentMatIndex].entries[selectedMatPropKey][2]));
     }
     catch (ArgumentOutOfRangeException)
     {
     }
 }