public void ButtonProcessor(int buttonID) { if (buttonID == buttonUp) { CurrentMenu.PreviousItem(); } if (buttonID == buttonDown) { CurrentMenu.NextItem(); } if (buttonID == buttonEnter) { CurrentMenu.SelectItem(); } if (buttonID == buttonEsc) { CloseSubMenu(); } if (buttonID == buttonHome) { menuStack.RemoveRange(1, menuStack.Count - 1); } if (buttonID == buttonRight) { JUtil.LogInfo(null, "dumping experiment"); DumpObject(experimentModules[experimentsMenu.GetCurrentIndex()]); } if (buttonID == buttonLeft) { DumpObject(containerModules[containersMenu.GetCurrentIndex()]); } if (buttonID == buttonNext) { var experiment = experimentModules[experimentsMenu.GetCurrentIndex()]; var scienceData = experiment.GetData(); DumpObject(experiment); JUtil.LogInfo(null, "{0} science data", scienceData.Length); foreach (var data in scienceData) { JUtil.LogInfo(null, "science data"); DumpObject(data); var subject = ResearchAndDevelopment.GetSubjectByID(data.subjectID); JUtil.LogInfo(null, "subject"); DumpObject(subject); } JUtil.LogInfo(null, "experiment"); DumpObject(experiment.experiment); JUtil.LogInfo(null, "actions"); foreach (var action in experiment.Actions) { DumpObject(action); } } }