public SlideLayoutPicker(IEnumerable <TemplateSlide> presetSlides)
            : base("Lecture.GUI.SlideLayoutPicker.SlideLayoutPicker.layout")
        {
            buttonGrid = new NoSelectButtonGrid((ScrollView)widget.findWidget("ButtonGrid"));

            foreach (TemplateSlide slide in presetSlides)
            {
                ButtonGridItem item = buttonGrid.addItem("Main", slide.Name, slide.IconName);
                item.ItemClicked += item_ItemClicked;
                item.UserObject   = slide;
            }
        }
        void sequenceController_SequenceAdded(MovementSequenceController controller, MovementSequenceGroup group, MovementSequenceInfo sequenceInfo)
        {
            ButtonGridItem item = buttonGrid.addItem(group.Name, sequenceInfo.Name);

            item.UserObject   = sequenceInfo;
            item.ItemClicked += (s, e) =>
            {
                MovementSequence sequence = sequenceController.loadSequence(sequenceInfo);
                sequenceController.stopPlayback();
                sequenceController.CurrentSequence = sequence;
                sequenceController.playCurrentSequence();
                this.hide();
            };
        }