예제 #1
0
파일: IO_CRUD.cs 프로젝트: BHoM/BHoM_UI
        /*************************************/

        public virtual bool RemoveInput(string name)
        {
            if (name == null)
            {
                return(false);
            }

            ParamInfo match = InputParams.Find(x => x.Name == name);

            if (match != null)
            {
                match.IsSelected = false;
            }

            return(true);
        }
예제 #2
0
파일: IO_CRUD.cs 프로젝트: BHoM/BHoM_UI
        /*************************************/
        /**** Input Methods               ****/
        /*************************************/

        public virtual bool AddInput(int index, string name, Type type = null)
        {
            if (name == null || index < 0)
            {
                return(false);
            }

            ParamInfo match = InputParams.Find(x => x.Name == name);

            if (match != null)
            {
                match.IsSelected = true;
            }
            else
            {
                ParamInfo param = Engine.UI.Create.ParamInfo(name, type);
                InputParams.Insert(index, param);
                m_CompiledGetters.Insert(index, Engine.UI.Create.InputAccessor(m_DataAccessor.GetType(), param.DataType));
            }

            return(true);
        }
예제 #3
0
파일: IO_CRUD.cs 프로젝트: BHoM/BHoM_UI
        /*************************************/

        public virtual bool CanRemoveInput(string name)
        {
            ParamInfo match = InputParams.Find(x => x.Name == name);

            return(match != null && !match.IsRequired);
        }