예제 #1
0
 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);
 }
예제 #2
0
        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);
        }