public void setupButtons() { ConfigCar tmpConfig = this.configCar; if (tmpConfig.butterfly_doors == 0) { disableButterflyButtons(); } if (tmpConfig.doors == 0) { disableDoorsButtons(); } if (tmpConfig.engine == 0) { disableEngineButtons(); } if (tmpConfig.clutch == 0) { disableClutchButtons(); } if (tmpConfig.hood_car == 0) { disableHoodButtons(); } if (tmpConfig.trunk_car == 0) { disableTrunkButtons(); } }
private void dataConfigCar_CellContentClick(object sender, DataGridViewCellEventArgs e) { int numberLineInTable = e.RowIndex; string json_message = dataConfigCar[5, numberLineInTable].Value.ToString(); ConfigCar cc = JsonConvert.DeserializeObject <ConfigCar>(json_message); FormConfigCar nextWindow = new FormConfigCar(cc); nextWindow.ShowDialog(); }
public FormConfigCar(ConfigCar car) { InitializeComponent(); this.configCar = car; setupButtons(); }