public void UpdateSettings(FanSettings fs) { if (fc != null) { fc.UpdateSettings(fs); } }
void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && e.ColumnIndex == 7) { var fs = dataGridView2.Rows[e.RowIndex].DataBoundItem as FanSettings; fancontroller.UpdateSettings(fs); updatefansettings = true; } }