I would have a feedback on the way I'm currently handling the new feature for Prism and its BP calculator.
I'm attempting to have as much possible a cleaner form (frmStructurePreference.vb) in order to avoid useless methods and event handlers.
Todo so, I'm using databinding which are binding form fields to model properties (StructurePreference.vb)
The StructurePreference.vb model is storing a list of bonus model (StructureBonus.vb) with bonuses which are applied by the structure.
Then, when you're simulating an industry job from BP Calculator which is either a manufacturing or a science job, we just need to iterate over bonuses and call IsAppliedTo() method.
This method will return true if the bonus from which it is called is applying to the passed item.
I would have a feedback on the way I'm currently handling the new feature for Prism and its BP calculator.
I'm attempting to have as much possible a cleaner form (
frmStructurePreference.vb
) in order to avoid useless methods and event handlers. Todo so, I'm using databinding which are binding form fields to model properties (StructurePreference.vb
)The
StructurePreference.vb
model is storing a list of bonus model (StructureBonus.vb
) with bonuses which are applied by the structure.Then, when you're simulating an industry job from BP Calculator which is either a manufacturing or a science job, we just need to iterate over bonuses and call
IsAppliedTo()
method. This method will return true if the bonus from which it is called is applying to the passed item.