private void UpdateTreasureLandDict(ComboBoxWithDefault sender, IDictionary <PropositionType, BonusIndex> dict) { string changed = sender.Tag.ToString(); PropositionType type = (PropositionType)Enum.Parse(typeof(PropositionType), changed); dict[type] = (BonusIndex)(sender.SelectedIndex); }
private void UpdateBonusCashDict(ComboBoxWithDefault sender, TupleDictionary <PropositionType, BonusPercent, BonusIndex> dict) { string changed = sender.Tag.ToString(); string[] sides = changed.Split('.'); string errandType = sides[0]; string percentage = sides[1]; BonusPercent percent = (BonusPercent)Enum.Parse(typeof(BonusPercent), percentage); PropositionType type = (PropositionType)Enum.Parse(typeof(PropositionType), errandType); dict[type, percent] = (BonusIndex)(sender.SelectedIndex); }
private void SetValuesTreasureLandComboBoxes( IDictionary <PropositionType, BonusIndex> dict, IDictionary <PropositionType, BonusIndex> def, IList <ComboBoxWithDefault> boxes) { foreach (var box in boxes) { string tag = box.Tag.ToString(); PropositionType type = (PropositionType)Enum.Parse(typeof(PropositionType), tag); box.SetIndexAndDefault((int)dict[type], (int)def[type]); } }
private void SetValuesBonusCashComboBoxes( TupleDictionary <PropositionType, BonusPercent, BonusIndex> dict, TupleDictionary <PropositionType, BonusPercent, BonusIndex> def, IList <ComboBoxWithDefault> boxes) { foreach (var box in boxes) { string tag = box.Tag.ToString(); string[] sides = tag.Split('.'); string errandType = sides[0]; string percentage = sides[1]; PropositionType type = (PropositionType)Enum.Parse(typeof(PropositionType), errandType); BonusPercent percent = (BonusPercent)Enum.Parse(typeof(BonusPercent), percentage); box.SetIndexAndDefault((int)dict[type, percent], (int)def[type, percent]); } }
public void SetPropositionTypeBonus( PropositionType type, PropositionClass _class, byte value ) { propTypeBonuses[type, _class] = value; }
public void SetPropositionTypeBonus(PropositionType type, PropositionClass _class, byte value) { propTypeBonuses[type, _class] = value; }