/// <summary> /// 編集項目の色を更新する /// </summary> /// <param name="leader"></param> private void UpdateEditableItemsColor(Leader leader) { // コンボボックスの色を更新する countryComboBox.Refresh(); branchComboBox.Refresh(); idealRankComboBox.Refresh(); // 編集項目の色を更新する idNumericUpDown.ForeColor = leader.IsDirty(LeaderItemId.Id) ? Color.Red : SystemColors.WindowText; nameTextBox.ForeColor = leader.IsDirty(LeaderItemId.Name) ? Color.Red : SystemColors.WindowText; skillNumericUpDown.ForeColor = leader.IsDirty(LeaderItemId.Skill) ? Color.Red : SystemColors.WindowText; maxSkillNumericUpDown.ForeColor = leader.IsDirty(LeaderItemId.MaxSkill) ? Color.Red : SystemColors.WindowText; experienceNumericUpDown.ForeColor = leader.IsDirty(LeaderItemId.Experience) ? Color.Red : SystemColors.WindowText; loyaltyNumericUpDown.ForeColor = leader.IsDirty(LeaderItemId.Loyalty) ? Color.Red : SystemColors.WindowText; startYearNumericUpDown.ForeColor = leader.IsDirty(LeaderItemId.StartYear) ? Color.Red : SystemColors.WindowText; endYearNumericUpDown.ForeColor = leader.IsDirty(LeaderItemId.EndYear) ? Color.Red : SystemColors.WindowText; retirementYearNumericUpDown.ForeColor = leader.IsDirty(LeaderItemId.RetirementYear) ? Color.Red : SystemColors.WindowText; rankYearNumericUpDown1.ForeColor = leader.IsDirty(LeaderItemId.Rank3Year) ? Color.Red : SystemColors.WindowText; rankYearNumericUpDown2.ForeColor = leader.IsDirty(LeaderItemId.Rank2Year) ? Color.Red : SystemColors.WindowText; rankYearNumericUpDown3.ForeColor = leader.IsDirty(LeaderItemId.Rank1Year) ? Color.Red : SystemColors.WindowText; rankYearNumericUpDown4.ForeColor = leader.IsDirty(LeaderItemId.Rank0Year) ? Color.Red : SystemColors.WindowText; pictureNameTextBox.ForeColor = leader.IsDirty(LeaderItemId.PictureName) ? Color.Red : SystemColors.WindowText; // 特性チェックボックスの項目色を更新する logisticsWizardCheckBox.ForeColor = leader.IsDirty(LeaderItemId.LogisticsWizard) ? Color.Red : SystemColors.WindowText; defensiveDoctrineCheckBox.ForeColor = leader.IsDirty(LeaderItemId.DefensiveDoctrine) ? Color.Red : SystemColors.WindowText; offensiveDoctrineCheckBox.ForeColor = leader.IsDirty(LeaderItemId.OffensiveDoctrine) ? Color.Red : SystemColors.WindowText; winterSpecialistCheckBox.ForeColor = leader.IsDirty(LeaderItemId.WinterSpecialist) ? Color.Red : SystemColors.WindowText; tricksterCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Trickster) ? Color.Red : SystemColors.WindowText; engineerCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Engineer) ? Color.Red : SystemColors.WindowText; fortressBusterCheckBox.ForeColor = leader.IsDirty(LeaderItemId.FortressBuster) ? Color.Red : SystemColors.WindowText; panzerLeaderCheckBox.ForeColor = leader.IsDirty(LeaderItemId.PanzerLeader) ? Color.Red : SystemColors.WindowText; commandoCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Commando) ? Color.Red : SystemColors.WindowText; oldGuardCheckBox.ForeColor = leader.IsDirty(LeaderItemId.OldGuard) ? Color.Red : SystemColors.WindowText; seaWolfCheckBox.ForeColor = leader.IsDirty(LeaderItemId.SeaWolf) ? Color.Red : SystemColors.WindowText; blockadeRunnerCheckBox.ForeColor = leader.IsDirty(LeaderItemId.BlockadeRunner) ? Color.Red : SystemColors.WindowText; superiorTacticianCheckBox.ForeColor = leader.IsDirty(LeaderItemId.SuperiorTactician) ? Color.Red : SystemColors.WindowText; spotterCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Spotter) ? Color.Red : SystemColors.WindowText; tankBusterCheckBox.ForeColor = leader.IsDirty(LeaderItemId.TankBuster) ? Color.Red : SystemColors.WindowText; carpetBomberCheckBox.ForeColor = leader.IsDirty(LeaderItemId.CarpetBomber) ? Color.Red : SystemColors.WindowText; nightFlyerCheckBox.ForeColor = leader.IsDirty(LeaderItemId.NightFlyer) ? Color.Red : SystemColors.WindowText; fleetDestroyerCheckBox.ForeColor = leader.IsDirty(LeaderItemId.FleetDestroyer) ? Color.Red : SystemColors.WindowText; desertFoxCheckBox.ForeColor = leader.IsDirty(LeaderItemId.DesertFox) ? Color.Red : SystemColors.WindowText; jungleRatCheckBox.ForeColor = leader.IsDirty(LeaderItemId.JungleRat) ? Color.Red : SystemColors.WindowText; urbanWarfareSpecialistCheckBox.ForeColor = leader.IsDirty(LeaderItemId.UrbanWarfareSpecialist) ? Color.Red : SystemColors.WindowText; rangerCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Ranger) ? Color.Red : SystemColors.WindowText; mountaineerCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Mountaineer) ? Color.Red : SystemColors.WindowText; hillsFighterCheckBox.ForeColor = leader.IsDirty(LeaderItemId.HillsFighter) ? Color.Red : SystemColors.WindowText; counterAttackerCheckBox.ForeColor = leader.IsDirty(LeaderItemId.CounterAttacker) ? Color.Red : SystemColors.WindowText; assaulterCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Assaulter) ? Color.Red : SystemColors.WindowText; encirclerCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Encircler) ? Color.Red : SystemColors.WindowText; ambusherCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Ambusher) ? Color.Red : SystemColors.WindowText; disciplinedCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Disciplined) ? Color.Red : SystemColors.WindowText; elasticDefenceSpecialistCheckBox.ForeColor = leader.IsDirty(LeaderItemId.ElasticDefenceSpecialist) ? Color.Red : SystemColors.WindowText; blitzerCheckBox.ForeColor = leader.IsDirty(LeaderItemId.Blitzer) ? Color.Red : SystemColors.WindowText; }