/** Opens the reviewData dialog for an experiment */ private void review(ModuleScienceExperiment exp) { IETExperiment activator = checkType(exp); if (activator != null) { activator.reviewData(exp); } }
/** Resets an experiment */ private void Reset(ModuleScienceExperiment exp) { IETExperiment activator = checkType(exp); if (activator != null) { activator.resetExperiment(exp); } }
/** Deploys an experiment */ private void deploy(ModuleScienceExperiment exp) { IETExperiment activator = checkType(exp); if (activator != null) { activator.deployExperiment(exp); } }
/** Checks type for an experiment and returns suitable IETExperiment */ private IETExperiment checkType(ModuleScienceExperiment exp) { for (int i = activators.Count - 1; i >= 0; i--) { IETExperiment act = activators[i]; try { if (exp.GetType() == act.getType() || exp.GetType().IsSubclassOf(act.getType())) { return(act); } } catch (Exception) { continue; } } return(null); }