private void weaponDropdown_SelectedIndexChanged(object sender, EventArgs e) { unitDatabase.setCurrentWeapon((Weapon)weaponDropdown.SelectedItem); customQueryOutputField.Text = unitDatabase.doCustomQuery(customQueryInput.Text); // avoid callback weaponDropdownSimple.SelectedIndexChanged -= weaponDropdownSimple_SelectedIndexChanged; weaponDropdownSimple.SelectedItem = weaponDropdown.SelectedItem; weaponDropdownSimple.SelectedIndexChanged += weaponDropdownSimple_SelectedIndexChanged; // Controls from Firepower tab ------ #region //weaponPictureField.Image = unitDatabase.getWeaponPicture(); turretField.Text = unitDatabase.getWeaponTurret(); aimTimeField.Text = unitDatabase.getAimTime(); accuracyField.Text = unitDatabase.getAccuracy(); minAccuracyField.Text = unitDatabase.getMinAccuracy(); minCritChanceField.Text = unitDatabase.getMinCritChance(); stabilizerField.Text = unitDatabase.getStabilizer(); supplyCostField.Text = unitDatabase.getSupplyCost(); suppressionField.Text = unitDatabase.getSuppression(); suppressionSplashRadius.Text = unitDatabase.getSuppressionSplash(); heField.Text = unitDatabase.getHE(); apField.Text = unitDatabase.getAP(); heSplashField.Text = unitDatabase.getHeSplash(); tagsLabel.Text = unitDatabase.getTags(); groundRangeField.Text = unitDatabase.getGroundRange(); heloRangeField.Text = unitDatabase.getHeloRange(); planeRangeField.Text = unitDatabase.getPlaneRange(); noiseField.Text = unitDatabase.getNoise(); fireChanceField.Text = unitDatabase.getFireChance(); salvoLengthField.Text = unitDatabase.getSalvoLength(); shotReloadField.Text = unitDatabase.getShotReloadPostprocessed(); salvoReloadField.Text = unitDatabase.getSalvoReload(); rofField.Text = unitDatabase.getROF(); maxDispersionField.Text = unitDatabase.getMaxDispersion(); minDispersionField.Text = unitDatabase.getMinDispersion(); angleDispersionField.Text = unitDatabase.getAngleDispersion(); tirReflexeField.Text = unitDatabase.getTirReflexe(); randomDispersionField.Text = unitDatabase.getRandomDispersion(); missileTimeBetweenCorrectionsField.Text = unitDatabase.getMissileTimeBetweenCorrections(); puissanceField.Text = unitDatabase.getPuissance(); missileMaxSpeedField.Text = unitDatabase.getMissileMaxSpeed(); ammoField.Text = unitDatabase.getAmmo(); missileMaxAccelField.Text = unitDatabase.getMissileMaxAcceleration(); // END firepower controls ----------- #endregion // Controls from simple tab --------- #region groundRangeFieldSimple.Text = groundRangeField.Text; planeRangeFieldSimple.Text = planeRangeField.Text; heloRangeFieldSimple.Text = heloRangeField.Text; tagsLabelSimple.Text = tagsLabel.Text; accuracyFieldSimple.Text = accuracyField.Text; stabilizerFieldSimple.Text = stabilizerField.Text; apFieldSimple.Text = apField.Text; heFieldSimple.Text = heField.Text; rofFieldSimple.Text = rofField.Text; shotReloadFieldSimple.Text = shotReloadField.Text; salvoLengthFieldSimple.Text = salvoLengthField.Text; salvoReloadFieldSimple.Text = salvoReloadField.Text; aimTimeFieldSimple.Text = aimTimeField.Text; ammoFieldSimple.Text = ammoField.Text; maxDispersionFieldSimple.Text = maxDispersionField.Text; minDispersionFieldSimple.Text = minDispersionField.Text; missileSpeedFieldSimple.Text = missileMaxSpeedField.Text; supplyCostFieldSimple.Text = supplyCostField.Text; turretFieldSimple.Text = turretField.Text; tagsLabelSimple.Text = tagsLabel.Text; suppressionFieldSimple.Text = suppressionField.Text; // END simple controls -------------- #endregion }