예제 #1
0
        /*************************************/
        /**** Protected Methods           ****/
        /*************************************/

        protected virtual void SetInputSelectionMenu()
        {
            m_InputSelector = new ParamSelectorMenu(InputParams);
            m_InputSelector.SelectionChanged += (sender, changedIndices) =>
            {
                MarkAsModified(new CallerUpdate
                {
                    Cause        = CallerUpdateCause.InputSelection,
                    InputUpdates = changedIndices.Select <int, IParamUpdate>(i =>
                    {
                        if (InputParams[i].IsSelected)
                        {
                            return new ParamAdded {
                                Index = InputParams.SelectionIndex(i), Name = InputParams[i].Name, Param = InputParams[i]
                            }
                        }
                        ;
                        else
                        {
                            return new ParamRemoved {
                                Name = InputParams[i].Name, Param = InputParams[i]
                            }
                        };
                    }).ToList()
                });
            };